const (
// Operation types.
OpCreate = ent.OpCreate
OpDelete = ent.OpDelete
OpDeleteOne = ent.OpDeleteOne
OpUpdate = ent.OpUpdate
OpUpdateOne = ent.OpUpdateOne
// Node types.
TypeAuth = "Auth"
TypeHPAmebloPost = "HPAmebloPost"
TypeHPArtist = "HPArtist"
TypeHPAsset = "HPAsset"
TypeHPBlob = "HPBlob"
TypeHPElineupMallItem = "HPElineupMallItem"
TypeHPEvent = "HPEvent"
TypeHPFCEventTicket = "HPFCEventTicket"
TypeHPFeedItem = "HPFeedItem"
TypeHPFollow = "HPFollow"
TypeHPIgPost = "HPIgPost"
TypeHPMember = "HPMember"
TypeHPSortHistory = "HPSortHistory"
TypeHPViewHistory = "HPViewHistory"
TypeTestEnt = "TestEnt"
TypeUser = "User"
TypeUserNotificationLog = "UserNotificationLog"
TypeUserNotificationSetting = "UserNotificationSetting"
)
DefaultAuthOrder is the default ordering of Auth.
var DefaultAuthOrder = &AuthOrder{ Direction: entgql.OrderDirectionAsc, Field: &AuthOrderField{ field: auth.FieldID, toCursor: func(a *Auth) Cursor { return Cursor{ID: a.ID} }, }, }
DefaultHPAmebloPostOrder is the default ordering of HPAmebloPost.
var DefaultHPAmebloPostOrder = &HPAmebloPostOrder{ Direction: entgql.OrderDirectionAsc, Field: &HPAmebloPostOrderField{ field: hpameblopost.FieldID, toCursor: func(hap *HPAmebloPost) Cursor { return Cursor{ID: hap.ID} }, }, }
DefaultHPArtistOrder is the default ordering of HPArtist.
var DefaultHPArtistOrder = &HPArtistOrder{ Direction: entgql.OrderDirectionAsc, Field: &HPArtistOrderField{ field: hpartist.FieldID, toCursor: func(ha *HPArtist) Cursor { return Cursor{ID: ha.ID} }, }, }
DefaultHPBlobOrder is the default ordering of HPBlob.
var DefaultHPBlobOrder = &HPBlobOrder{ Direction: entgql.OrderDirectionAsc, Field: &HPBlobOrderField{ field: hpblob.FieldID, toCursor: func(hb *HPBlob) Cursor { return Cursor{ID: hb.ID} }, }, }
DefaultHPElineupMallItemOrder is the default ordering of HPElineupMallItem.
var DefaultHPElineupMallItemOrder = &HPElineupMallItemOrder{ Direction: entgql.OrderDirectionAsc, Field: &HPElineupMallItemOrderField{ field: hpelineupmallitem.FieldID, toCursor: func(hemi *HPElineupMallItem) Cursor { return Cursor{ID: hemi.ID} }, }, }
DefaultHPEventOrder is the default ordering of HPEvent.
var DefaultHPEventOrder = &HPEventOrder{ Direction: entgql.OrderDirectionAsc, Field: &HPEventOrderField{ field: hpevent.FieldID, toCursor: func(he *HPEvent) Cursor { return Cursor{ID: he.ID} }, }, }
DefaultHPFCEventTicketOrder is the default ordering of HPFCEventTicket.
var DefaultHPFCEventTicketOrder = &HPFCEventTicketOrder{ Direction: entgql.OrderDirectionAsc, Field: &HPFCEventTicketOrderField{ field: hpfceventticket.FieldID, toCursor: func(het *HPFCEventTicket) Cursor { return Cursor{ID: het.ID} }, }, }
DefaultHPFeedItemOrder is the default ordering of HPFeedItem.
var DefaultHPFeedItemOrder = &HPFeedItemOrder{ Direction: entgql.OrderDirectionAsc, Field: &HPFeedItemOrderField{ field: hpfeeditem.FieldID, toCursor: func(hfi *HPFeedItem) Cursor { return Cursor{ID: hfi.ID} }, }, }
DefaultHPFollowOrder is the default ordering of HPFollow.
var DefaultHPFollowOrder = &HPFollowOrder{ Direction: entgql.OrderDirectionAsc, Field: &HPFollowOrderField{ field: hpfollow.FieldID, toCursor: func(hf *HPFollow) Cursor { return Cursor{ID: hf.ID} }, }, }
DefaultHPIgPostOrder is the default ordering of HPIgPost.
var DefaultHPIgPostOrder = &HPIgPostOrder{ Direction: entgql.OrderDirectionAsc, Field: &HPIgPostOrderField{ field: hpigpost.FieldID, toCursor: func(hip *HPIgPost) Cursor { return Cursor{ID: hip.ID} }, }, }
DefaultHPMemberOrder is the default ordering of HPMember.
var DefaultHPMemberOrder = &HPMemberOrder{ Direction: entgql.OrderDirectionAsc, Field: &HPMemberOrderField{ field: hpmember.FieldID, toCursor: func(hm *HPMember) Cursor { return Cursor{ID: hm.ID} }, }, }
DefaultHPSortHistoryOrder is the default ordering of HPSortHistory.
var DefaultHPSortHistoryOrder = &HPSortHistoryOrder{ Direction: entgql.OrderDirectionAsc, Field: &HPSortHistoryOrderField{ field: hpsorthistory.FieldID, toCursor: func(hsh *HPSortHistory) Cursor { return Cursor{ID: hsh.ID} }, }, }
DefaultHPViewHistoryOrder is the default ordering of HPViewHistory.
var DefaultHPViewHistoryOrder = &HPViewHistoryOrder{ Direction: entgql.OrderDirectionAsc, Field: &HPViewHistoryOrderField{ field: hpviewhistory.FieldID, toCursor: func(hvh *HPViewHistory) Cursor { return Cursor{ID: hvh.ID} }, }, }
DefaultUserNotificationSettingOrder is the default ordering of UserNotificationSetting.
var DefaultUserNotificationSettingOrder = &UserNotificationSettingOrder{ Direction: entgql.OrderDirectionAsc, Field: &UserNotificationSettingOrderField{ field: usernotificationsetting.FieldID, toCursor: func(uns *UserNotificationSetting) Cursor { return Cursor{ID: uns.ID} }, }, }
DefaultUserOrder is the default ordering of User.
var DefaultUserOrder = &UserOrder{ Direction: entgql.OrderDirectionAsc, Field: &UserOrderField{ field: user.FieldID, toCursor: func(u *User) Cursor { return Cursor{ID: u.ID} }, }, }
var (
// HPFeedItemOrderFieldPostAt orders HPFeedItem by post_at.
HPFeedItemOrderFieldPostAt = &HPFeedItemOrderField{
field: hpfeeditem.FieldPostAt,
toCursor: func(hfi *HPFeedItem) Cursor {
return Cursor{
ID: hfi.ID,
Value: hfi.PostAt,
}
},
}
)
func Asc(fields ...string) func(*sql.Selector)
Asc applies the given fields in ASC order.
func Desc(fields ...string) func(*sql.Selector)
Desc applies the given fields in DESC order.
func IsConstraintError(err error) bool
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound(err error) bool
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded(err error) bool
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular(err error) bool
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError(err error) bool
IsValidationError returns a boolean indicating whether the error is a validation error.
func MaskNotFound(err error) error
MaskNotFound masks not found error.
func NewContext(parent context.Context, c *Client) context.Context
NewContext returns a new context with the given Client attached.
func NewTxContext(parent context.Context, tx *Tx) context.Context
NewTxContext returns a new context with the given Tx attached.
func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)
OpenTxFromContext open transactions from client stored in context.
AggregateFunc applies an aggregation step on the group-by traversal/selector.
type AggregateFunc func(*sql.Selector) string
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
Auth is the model entity for the Auth schema.
type Auth struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// oauth provider name
ProviderName string `json:"provider_name,omitempty"`
// user id that the provider uses
ProviderUserID string `json:"provider_user_id,omitempty"`
// access token
AccessToken string `json:"-"`
// refresh token
RefreshToken string `json:"-"`
// token expire
ExpireAt time.Time `json:"expire_at,omitempty"`
// oauth scope
Scope []string `json:"scope,omitempty"`
// owner user id
OwnerUserID int `json:"owner_user_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the AuthQuery when eager-loading is set.
Edges AuthEdges `json:"edges"`
// contains filtered or unexported fields
}
func (n *Auth) IsNode()
IsNode implements the Node interface check for GQLGen.
func (a *Auth) QueryUser() *UserQuery
QueryUser queries the "user" edge of the Auth entity.
func (a *Auth) String() string
String implements the fmt.Stringer.
func (a *Auth) ToEdge(order *AuthOrder) *AuthEdge
ToEdge converts Auth into AuthEdge.
func (a *Auth) Unwrap() *Auth
Unwrap unwraps the Auth entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (a *Auth) Update() *AuthUpdateOne
Update returns a builder for updating this Auth. Note that you need to call Auth.Unwrap() before calling this method if this Auth was returned from a transaction, and the transaction was committed or rolled back.
func (a *Auth) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the Auth. This includes values selected through modifiers, order, etc.
AuthClient is a client for the Auth schema.
type AuthClient struct {
// contains filtered or unexported fields
}
func NewAuthClient(c config) *AuthClient
NewAuthClient returns a client for the Auth from the given config.
func (c *AuthClient) Create() *AuthCreate
Create returns a builder for creating a Auth entity.
func (c *AuthClient) CreateBulk(builders ...*AuthCreate) *AuthCreateBulk
CreateBulk returns a builder for creating a bulk of Auth entities.
func (c *AuthClient) Delete() *AuthDelete
Delete returns a delete builder for Auth.
func (c *AuthClient) DeleteOne(a *Auth) *AuthDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *AuthClient) DeleteOneID(id int) *AuthDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *AuthClient) Get(ctx context.Context, id int) (*Auth, error)
Get returns a Auth entity by its id.
func (c *AuthClient) GetX(ctx context.Context, id int) *Auth
GetX is like Get, but panics if an error occurs.
func (c *AuthClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *AuthClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `auth.Intercept(f(g(h())))`.
func (c *AuthClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *AuthClient) Query() *AuthQuery
Query returns a query builder for Auth.
func (c *AuthClient) QueryUser(a *Auth) *UserQuery
QueryUser queries the user edge of a Auth.
func (c *AuthClient) Update() *AuthUpdate
Update returns an update builder for Auth.
func (c *AuthClient) UpdateOne(a *Auth) *AuthUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *AuthClient) UpdateOneID(id int) *AuthUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *AuthClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `auth.Hooks(f(g(h())))`.
AuthConnection is the connection containing edges to Auth.
type AuthConnection struct {
Edges []*AuthEdge `json:"edges"`
PageInfo PageInfo `json:"pageInfo"`
TotalCount int `json:"totalCount"`
}
AuthCreate is the builder for creating a Auth entity.
type AuthCreate struct {
// contains filtered or unexported fields
}
func (ac *AuthCreate) Exec(ctx context.Context) error
Exec executes the query.
func (ac *AuthCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (ac *AuthCreate) Mutation() *AuthMutation
Mutation returns the AuthMutation object of the builder.
func (ac *AuthCreate) OnConflict(opts ...sql.ConflictOption) *AuthUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Auth.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.AuthUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (ac *AuthCreate) OnConflictColumns(columns ...string) *AuthUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Auth.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (ac *AuthCreate) Save(ctx context.Context) (*Auth, error)
Save creates the Auth in the database.
func (ac *AuthCreate) SaveX(ctx context.Context) *Auth
SaveX calls Save and panics if Save returns an error.
func (ac *AuthCreate) SetAccessToken(s string) *AuthCreate
SetAccessToken sets the "access_token" field.
func (ac *AuthCreate) SetCreatedAt(t time.Time) *AuthCreate
SetCreatedAt sets the "created_at" field.
func (ac *AuthCreate) SetExpireAt(t time.Time) *AuthCreate
SetExpireAt sets the "expire_at" field.
func (ac *AuthCreate) SetNillableCreatedAt(t *time.Time) *AuthCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (ac *AuthCreate) SetNillableExpireAt(t *time.Time) *AuthCreate
SetNillableExpireAt sets the "expire_at" field if the given value is not nil.
func (ac *AuthCreate) SetNillableOwnerUserID(i *int) *AuthCreate
SetNillableOwnerUserID sets the "owner_user_id" field if the given value is not nil.
func (ac *AuthCreate) SetNillableRefreshToken(s *string) *AuthCreate
SetNillableRefreshToken sets the "refresh_token" field if the given value is not nil.
func (ac *AuthCreate) SetNillableUpdatedAt(t *time.Time) *AuthCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (ac *AuthCreate) SetNillableUserID(id *int) *AuthCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (ac *AuthCreate) SetOwnerUserID(i int) *AuthCreate
SetOwnerUserID sets the "owner_user_id" field.
func (ac *AuthCreate) SetProviderName(s string) *AuthCreate
SetProviderName sets the "provider_name" field.
func (ac *AuthCreate) SetProviderUserID(s string) *AuthCreate
SetProviderUserID sets the "provider_user_id" field.
func (ac *AuthCreate) SetRefreshToken(s string) *AuthCreate
SetRefreshToken sets the "refresh_token" field.
func (ac *AuthCreate) SetScope(s []string) *AuthCreate
SetScope sets the "scope" field.
func (ac *AuthCreate) SetUpdatedAt(t time.Time) *AuthCreate
SetUpdatedAt sets the "updated_at" field.
func (ac *AuthCreate) SetUser(u *User) *AuthCreate
SetUser sets the "user" edge to the User entity.
func (ac *AuthCreate) SetUserID(id int) *AuthCreate
SetUserID sets the "user" edge to the User entity by ID.
AuthCreateBulk is the builder for creating many Auth entities in bulk.
type AuthCreateBulk struct {
// contains filtered or unexported fields
}
func (acb *AuthCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (acb *AuthCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (acb *AuthCreateBulk) OnConflict(opts ...sql.ConflictOption) *AuthUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Auth.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.AuthUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (acb *AuthCreateBulk) OnConflictColumns(columns ...string) *AuthUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Auth.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (acb *AuthCreateBulk) Save(ctx context.Context) ([]*Auth, error)
Save creates the Auth entities in the database.
func (acb *AuthCreateBulk) SaveX(ctx context.Context) []*Auth
SaveX is like Save, but panics if an error occurs.
AuthDelete is the builder for deleting a Auth entity.
type AuthDelete struct {
// contains filtered or unexported fields
}
func (ad *AuthDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (ad *AuthDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (ad *AuthDelete) Where(ps ...predicate.Auth) *AuthDelete
Where appends a list predicates to the AuthDelete builder.
AuthDeleteOne is the builder for deleting a single Auth entity.
type AuthDeleteOne struct {
// contains filtered or unexported fields
}
func (ado *AuthDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (ado *AuthDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (ado *AuthDeleteOne) Where(ps ...predicate.Auth) *AuthDeleteOne
Where appends a list predicates to the AuthDelete builder.
AuthEdge is the edge representation of Auth.
type AuthEdge struct {
Node *Auth `json:"node"`
Cursor Cursor `json:"cursor"`
}
AuthEdges holds the relations/edges for other nodes in the graph.
type AuthEdges struct {
// User holds the value of the user edge.
User *User `json:"user,omitempty"`
// contains filtered or unexported fields
}
func (e AuthEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
AuthFilter provides a generic filtering capability at runtime for AuthQuery.
type AuthFilter struct {
// contains filtered or unexported fields
}
func (f *AuthFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *AuthFilter) WhereAccessToken(p entql.StringP)
WhereAccessToken applies the entql string predicate on the access_token field.
func (f *AuthFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (f *AuthFilter) WhereExpireAt(p entql.TimeP)
WhereExpireAt applies the entql time.Time predicate on the expire_at field.
func (f *AuthFilter) WhereHasUser()
WhereHasUser applies a predicate to check if query has an edge user.
func (f *AuthFilter) WhereHasUserWith(preds ...predicate.User)
WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).
func (f *AuthFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *AuthFilter) WhereOwnerUserID(p entql.IntP)
WhereOwnerUserID applies the entql int predicate on the owner_user_id field.
func (f *AuthFilter) WhereProviderName(p entql.StringP)
WhereProviderName applies the entql string predicate on the provider_name field.
func (f *AuthFilter) WhereProviderUserID(p entql.StringP)
WhereProviderUserID applies the entql string predicate on the provider_user_id field.
func (f *AuthFilter) WhereRefreshToken(p entql.StringP)
WhereRefreshToken applies the entql string predicate on the refresh_token field.
func (f *AuthFilter) WhereScope(p entql.BytesP)
WhereScope applies the entql json.RawMessage predicate on the scope field.
func (f *AuthFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
AuthGroupBy is the group-by builder for Auth entities.
type AuthGroupBy struct {
// contains filtered or unexported fields
}
func (agb *AuthGroupBy) Aggregate(fns ...AggregateFunc) *AuthGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *AuthGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *AuthGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *AuthGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *AuthGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *AuthGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *AuthGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *AuthGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *AuthGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *AuthGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *AuthGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *AuthGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *AuthGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (agb *AuthGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *AuthGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *AuthGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *AuthGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *AuthGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *AuthGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
AuthMutation represents an operation that mutates the Auth nodes in the graph.
type AuthMutation struct {
// contains filtered or unexported fields
}
func (m *AuthMutation) AccessToken() (r string, exists bool)
AccessToken returns the value of the "access_token" field in the mutation.
func (m *AuthMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *AuthMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *AuthMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *AuthMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *AuthMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *AuthMutation) AppendScope(s []string)
AppendScope adds s to the "scope" field.
func (m *AuthMutation) AppendedScope() ([]string, bool)
AppendedScope returns the list of values that were appended to the "scope" field in this mutation.
func (m *AuthMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (m *AuthMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *AuthMutation) ClearExpireAt()
ClearExpireAt clears the value of the "expire_at" field.
func (m *AuthMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *AuthMutation) ClearOwnerUserID()
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (m *AuthMutation) ClearRefreshToken()
ClearRefreshToken clears the value of the "refresh_token" field.
func (m *AuthMutation) ClearScope()
ClearScope clears the value of the "scope" field.
func (m *AuthMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (m *AuthMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (m *AuthMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *AuthMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m AuthMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *AuthMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (m *AuthMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (m *AuthMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *AuthMutation) ExpireAt() (r time.Time, exists bool)
ExpireAt returns the value of the "expire_at" field in the mutation.
func (m *AuthMutation) ExpireAtCleared() bool
ExpireAtCleared returns if the "expire_at" field was cleared in this mutation.
func (m *AuthMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *AuthMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *AuthMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *AuthMutation) Filter() *AuthFilter
Filter returns an entql.Where implementation to apply filters on the AuthMutation builder.
func (m *AuthMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *AuthMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *AuthMutation) OldAccessToken(ctx context.Context) (v string, err error)
OldAccessToken returns the old "access_token" field's value of the Auth entity. If the Auth object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *AuthMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
OldCreatedAt returns the old "created_at" field's value of the Auth entity. If the Auth object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *AuthMutation) OldExpireAt(ctx context.Context) (v time.Time, err error)
OldExpireAt returns the old "expire_at" field's value of the Auth entity. If the Auth object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *AuthMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *AuthMutation) OldOwnerUserID(ctx context.Context) (v int, err error)
OldOwnerUserID returns the old "owner_user_id" field's value of the Auth entity. If the Auth object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *AuthMutation) OldProviderName(ctx context.Context) (v string, err error)
OldProviderName returns the old "provider_name" field's value of the Auth entity. If the Auth object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *AuthMutation) OldProviderUserID(ctx context.Context) (v string, err error)
OldProviderUserID returns the old "provider_user_id" field's value of the Auth entity. If the Auth object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *AuthMutation) OldRefreshToken(ctx context.Context) (v string, err error)
OldRefreshToken returns the old "refresh_token" field's value of the Auth entity. If the Auth object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *AuthMutation) OldScope(ctx context.Context) (v []string, err error)
OldScope returns the old "scope" field's value of the Auth entity. If the Auth object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *AuthMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
OldUpdatedAt returns the old "updated_at" field's value of the Auth entity. If the Auth object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *AuthMutation) Op() Op
Op returns the operation name.
func (m *AuthMutation) OwnerUserID() (r int, exists bool)
OwnerUserID returns the value of the "owner_user_id" field in the mutation.
func (m *AuthMutation) OwnerUserIDCleared() bool
OwnerUserIDCleared returns if the "owner_user_id" field was cleared in this mutation.
func (m *AuthMutation) ProviderName() (r string, exists bool)
ProviderName returns the value of the "provider_name" field in the mutation.
func (m *AuthMutation) ProviderUserID() (r string, exists bool)
ProviderUserID returns the value of the "provider_user_id" field in the mutation.
func (m *AuthMutation) RefreshToken() (r string, exists bool)
RefreshToken returns the value of the "refresh_token" field in the mutation.
func (m *AuthMutation) RefreshTokenCleared() bool
RefreshTokenCleared returns if the "refresh_token" field was cleared in this mutation.
func (m *AuthMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *AuthMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *AuthMutation) ResetAccessToken()
ResetAccessToken resets all changes to the "access_token" field.
func (m *AuthMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (m *AuthMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *AuthMutation) ResetExpireAt()
ResetExpireAt resets all changes to the "expire_at" field.
func (m *AuthMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *AuthMutation) ResetOwnerUserID()
ResetOwnerUserID resets all changes to the "owner_user_id" field.
func (m *AuthMutation) ResetProviderName()
ResetProviderName resets all changes to the "provider_name" field.
func (m *AuthMutation) ResetProviderUserID()
ResetProviderUserID resets all changes to the "provider_user_id" field.
func (m *AuthMutation) ResetRefreshToken()
ResetRefreshToken resets all changes to the "refresh_token" field.
func (m *AuthMutation) ResetScope()
ResetScope resets all changes to the "scope" field.
func (m *AuthMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (m *AuthMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (m *AuthMutation) Scope() (r []string, exists bool)
Scope returns the value of the "scope" field in the mutation.
func (m *AuthMutation) ScopeCleared() bool
ScopeCleared returns if the "scope" field was cleared in this mutation.
func (m *AuthMutation) SetAccessToken(s string)
SetAccessToken sets the "access_token" field.
func (m *AuthMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (m *AuthMutation) SetExpireAt(t time.Time)
SetExpireAt sets the "expire_at" field.
func (m *AuthMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *AuthMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *AuthMutation) SetOwnerUserID(i int)
SetOwnerUserID sets the "owner_user_id" field.
func (m *AuthMutation) SetProviderName(s string)
SetProviderName sets the "provider_name" field.
func (m *AuthMutation) SetProviderUserID(s string)
SetProviderUserID sets the "provider_user_id" field.
func (m *AuthMutation) SetRefreshToken(s string)
SetRefreshToken sets the "refresh_token" field.
func (m *AuthMutation) SetScope(s []string)
SetScope sets the "scope" field.
func (m *AuthMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (m *AuthMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (m AuthMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *AuthMutation) Type() string
Type returns the node type of this mutation (Auth).
func (m *AuthMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (m *AuthMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (m *AuthMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (m *AuthMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (m *AuthMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (m *AuthMutation) Where(ps ...predicate.Auth)
Where appends a list predicates to the AuthMutation builder.
func (m *AuthMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AuthMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
AuthOrder defines the ordering of Auth.
type AuthOrder struct {
Direction OrderDirection `json:"direction"`
Field *AuthOrderField `json:"field"`
}
AuthOrderField defines the ordering field of Auth.
type AuthOrderField struct {
// contains filtered or unexported fields
}
AuthPaginateOption enables pagination customization.
type AuthPaginateOption func(*authPager) error
func WithAuthFilter(filter func(*AuthQuery) (*AuthQuery, error)) AuthPaginateOption
WithAuthFilter configures pagination filter.
func WithAuthOrder(order *AuthOrder) AuthPaginateOption
WithAuthOrder configures pagination ordering.
AuthQuery is the builder for querying Auth entities.
type AuthQuery struct {
// contains filtered or unexported fields
}
func (aq *AuthQuery) Aggregate(fns ...AggregateFunc) *AuthSelect
Aggregate returns a AuthSelect configured with the given aggregations.
func (aq *AuthQuery) All(ctx context.Context) ([]*Auth, error)
All executes the query and returns a list of Auths.
func (aq *AuthQuery) AllX(ctx context.Context) []*Auth
AllX is like All, but panics if an error occurs.
func (aq *AuthQuery) Clone() *AuthQuery
Clone returns a duplicate of the AuthQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (a *AuthQuery) CollectFields(ctx context.Context, satisfies ...string) (*AuthQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (aq *AuthQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (aq *AuthQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (aq *AuthQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (aq *AuthQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (aq *AuthQuery) Filter() *AuthFilter
Filter returns a Filter implementation to apply filters on the AuthQuery builder.
func (aq *AuthQuery) First(ctx context.Context) (*Auth, error)
First returns the first Auth entity from the query. Returns a *NotFoundError when no Auth was found.
func (aq *AuthQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Auth ID from the query. Returns a *NotFoundError when no Auth ID was found.
func (aq *AuthQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (aq *AuthQuery) FirstX(ctx context.Context) *Auth
FirstX is like First, but panics if an error occurs.
func (aq *AuthQuery) GroupBy(field string, fields ...string) *AuthGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Auth.Query().
GroupBy(auth.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (aq *AuthQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Auth IDs.
func (aq *AuthQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (aq *AuthQuery) Limit(limit int) *AuthQuery
Limit the number of records to be returned by this query.
func (aq *AuthQuery) Offset(offset int) *AuthQuery
Offset to start from.
func (aq *AuthQuery) Only(ctx context.Context) (*Auth, error)
Only returns a single Auth entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Auth entity is found. Returns a *NotFoundError when no Auth entities are found.
func (aq *AuthQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Auth ID in the query. Returns a *NotSingularError when more than one Auth ID is found. Returns a *NotFoundError when no entities are found.
func (aq *AuthQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (aq *AuthQuery) OnlyX(ctx context.Context) *Auth
OnlyX is like Only, but panics if an error occurs.
func (aq *AuthQuery) Order(o ...auth.Order) *AuthQuery
Order specifies how the records should be ordered.
func (a *AuthQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...AuthPaginateOption, ) (*AuthConnection, error)
Paginate executes the query and returns a relay based cursor connection to Auth.
func (aq *AuthQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (aq *AuthQuery) Select(fields ...string) *AuthSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.Auth.Query().
Select(auth.FieldCreatedAt).
Scan(ctx, &v)
func (aq *AuthQuery) Unique(unique bool) *AuthQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (aq *AuthQuery) Where(ps ...predicate.Auth) *AuthQuery
Where adds a new predicate for the AuthQuery builder.
func (aq *AuthQuery) WithUser(opts ...func(*UserQuery)) *AuthQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
AuthSelect is the builder for selecting fields of Auth entities.
type AuthSelect struct {
*AuthQuery
// contains filtered or unexported fields
}
func (as *AuthSelect) Aggregate(fns ...AggregateFunc) *AuthSelect
Aggregate adds the given aggregation functions to the selector query.
func (s *AuthSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *AuthSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *AuthSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *AuthSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *AuthSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *AuthSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *AuthSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *AuthSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *AuthSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *AuthSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *AuthSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *AuthSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (as *AuthSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *AuthSelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *AuthSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *AuthSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *AuthSelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *AuthSelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
AuthUpdate is the builder for updating Auth entities.
type AuthUpdate struct {
// contains filtered or unexported fields
}
func (au *AuthUpdate) AppendScope(s []string) *AuthUpdate
AppendScope appends s to the "scope" field.
func (au *AuthUpdate) ClearExpireAt() *AuthUpdate
ClearExpireAt clears the value of the "expire_at" field.
func (au *AuthUpdate) ClearOwnerUserID() *AuthUpdate
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (au *AuthUpdate) ClearRefreshToken() *AuthUpdate
ClearRefreshToken clears the value of the "refresh_token" field.
func (au *AuthUpdate) ClearScope() *AuthUpdate
ClearScope clears the value of the "scope" field.
func (au *AuthUpdate) ClearUpdatedAt() *AuthUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (au *AuthUpdate) ClearUser() *AuthUpdate
ClearUser clears the "user" edge to the User entity.
func (au *AuthUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (au *AuthUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (au *AuthUpdate) Mutation() *AuthMutation
Mutation returns the AuthMutation object of the builder.
func (au *AuthUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (au *AuthUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (au *AuthUpdate) SetAccessToken(s string) *AuthUpdate
SetAccessToken sets the "access_token" field.
func (au *AuthUpdate) SetExpireAt(t time.Time) *AuthUpdate
SetExpireAt sets the "expire_at" field.
func (au *AuthUpdate) SetNillableExpireAt(t *time.Time) *AuthUpdate
SetNillableExpireAt sets the "expire_at" field if the given value is not nil.
func (au *AuthUpdate) SetNillableOwnerUserID(i *int) *AuthUpdate
SetNillableOwnerUserID sets the "owner_user_id" field if the given value is not nil.
func (au *AuthUpdate) SetNillableRefreshToken(s *string) *AuthUpdate
SetNillableRefreshToken sets the "refresh_token" field if the given value is not nil.
func (au *AuthUpdate) SetNillableUpdatedAt(t *time.Time) *AuthUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (au *AuthUpdate) SetNillableUserID(id *int) *AuthUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (au *AuthUpdate) SetOwnerUserID(i int) *AuthUpdate
SetOwnerUserID sets the "owner_user_id" field.
func (au *AuthUpdate) SetProviderName(s string) *AuthUpdate
SetProviderName sets the "provider_name" field.
func (au *AuthUpdate) SetProviderUserID(s string) *AuthUpdate
SetProviderUserID sets the "provider_user_id" field.
func (au *AuthUpdate) SetRefreshToken(s string) *AuthUpdate
SetRefreshToken sets the "refresh_token" field.
func (au *AuthUpdate) SetScope(s []string) *AuthUpdate
SetScope sets the "scope" field.
func (au *AuthUpdate) SetUpdatedAt(t time.Time) *AuthUpdate
SetUpdatedAt sets the "updated_at" field.
func (au *AuthUpdate) SetUser(u *User) *AuthUpdate
SetUser sets the "user" edge to the User entity.
func (au *AuthUpdate) SetUserID(id int) *AuthUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (au *AuthUpdate) Where(ps ...predicate.Auth) *AuthUpdate
Where appends a list predicates to the AuthUpdate builder.
AuthUpdateOne is the builder for updating a single Auth entity.
type AuthUpdateOne struct {
// contains filtered or unexported fields
}
func (auo *AuthUpdateOne) AppendScope(s []string) *AuthUpdateOne
AppendScope appends s to the "scope" field.
func (auo *AuthUpdateOne) ClearExpireAt() *AuthUpdateOne
ClearExpireAt clears the value of the "expire_at" field.
func (auo *AuthUpdateOne) ClearOwnerUserID() *AuthUpdateOne
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (auo *AuthUpdateOne) ClearRefreshToken() *AuthUpdateOne
ClearRefreshToken clears the value of the "refresh_token" field.
func (auo *AuthUpdateOne) ClearScope() *AuthUpdateOne
ClearScope clears the value of the "scope" field.
func (auo *AuthUpdateOne) ClearUpdatedAt() *AuthUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (auo *AuthUpdateOne) ClearUser() *AuthUpdateOne
ClearUser clears the "user" edge to the User entity.
func (auo *AuthUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (auo *AuthUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (auo *AuthUpdateOne) Mutation() *AuthMutation
Mutation returns the AuthMutation object of the builder.
func (auo *AuthUpdateOne) Save(ctx context.Context) (*Auth, error)
Save executes the query and returns the updated Auth entity.
func (auo *AuthUpdateOne) SaveX(ctx context.Context) *Auth
SaveX is like Save, but panics if an error occurs.
func (auo *AuthUpdateOne) Select(field string, fields ...string) *AuthUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (auo *AuthUpdateOne) SetAccessToken(s string) *AuthUpdateOne
SetAccessToken sets the "access_token" field.
func (auo *AuthUpdateOne) SetExpireAt(t time.Time) *AuthUpdateOne
SetExpireAt sets the "expire_at" field.
func (auo *AuthUpdateOne) SetNillableExpireAt(t *time.Time) *AuthUpdateOne
SetNillableExpireAt sets the "expire_at" field if the given value is not nil.
func (auo *AuthUpdateOne) SetNillableOwnerUserID(i *int) *AuthUpdateOne
SetNillableOwnerUserID sets the "owner_user_id" field if the given value is not nil.
func (auo *AuthUpdateOne) SetNillableRefreshToken(s *string) *AuthUpdateOne
SetNillableRefreshToken sets the "refresh_token" field if the given value is not nil.
func (auo *AuthUpdateOne) SetNillableUpdatedAt(t *time.Time) *AuthUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (auo *AuthUpdateOne) SetNillableUserID(id *int) *AuthUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (auo *AuthUpdateOne) SetOwnerUserID(i int) *AuthUpdateOne
SetOwnerUserID sets the "owner_user_id" field.
func (auo *AuthUpdateOne) SetProviderName(s string) *AuthUpdateOne
SetProviderName sets the "provider_name" field.
func (auo *AuthUpdateOne) SetProviderUserID(s string) *AuthUpdateOne
SetProviderUserID sets the "provider_user_id" field.
func (auo *AuthUpdateOne) SetRefreshToken(s string) *AuthUpdateOne
SetRefreshToken sets the "refresh_token" field.
func (auo *AuthUpdateOne) SetScope(s []string) *AuthUpdateOne
SetScope sets the "scope" field.
func (auo *AuthUpdateOne) SetUpdatedAt(t time.Time) *AuthUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (auo *AuthUpdateOne) SetUser(u *User) *AuthUpdateOne
SetUser sets the "user" edge to the User entity.
func (auo *AuthUpdateOne) SetUserID(id int) *AuthUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (auo *AuthUpdateOne) Where(ps ...predicate.Auth) *AuthUpdateOne
Where appends a list predicates to the AuthUpdate builder.
AuthUpsert is the "OnConflict" setter.
type AuthUpsert struct {
*sql.UpdateSet
}
func (u *AuthUpsert) ClearExpireAt() *AuthUpsert
ClearExpireAt clears the value of the "expire_at" field.
func (u *AuthUpsert) ClearOwnerUserID() *AuthUpsert
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (u *AuthUpsert) ClearRefreshToken() *AuthUpsert
ClearRefreshToken clears the value of the "refresh_token" field.
func (u *AuthUpsert) ClearScope() *AuthUpsert
ClearScope clears the value of the "scope" field.
func (u *AuthUpsert) ClearUpdatedAt() *AuthUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *AuthUpsert) SetAccessToken(v string) *AuthUpsert
SetAccessToken sets the "access_token" field.
func (u *AuthUpsert) SetExpireAt(v time.Time) *AuthUpsert
SetExpireAt sets the "expire_at" field.
func (u *AuthUpsert) SetOwnerUserID(v int) *AuthUpsert
SetOwnerUserID sets the "owner_user_id" field.
func (u *AuthUpsert) SetProviderName(v string) *AuthUpsert
SetProviderName sets the "provider_name" field.
func (u *AuthUpsert) SetProviderUserID(v string) *AuthUpsert
SetProviderUserID sets the "provider_user_id" field.
func (u *AuthUpsert) SetRefreshToken(v string) *AuthUpsert
SetRefreshToken sets the "refresh_token" field.
func (u *AuthUpsert) SetScope(v []string) *AuthUpsert
SetScope sets the "scope" field.
func (u *AuthUpsert) SetUpdatedAt(v time.Time) *AuthUpsert
SetUpdatedAt sets the "updated_at" field.
func (u *AuthUpsert) UpdateAccessToken() *AuthUpsert
UpdateAccessToken sets the "access_token" field to the value that was provided on create.
func (u *AuthUpsert) UpdateExpireAt() *AuthUpsert
UpdateExpireAt sets the "expire_at" field to the value that was provided on create.
func (u *AuthUpsert) UpdateOwnerUserID() *AuthUpsert
UpdateOwnerUserID sets the "owner_user_id" field to the value that was provided on create.
func (u *AuthUpsert) UpdateProviderName() *AuthUpsert
UpdateProviderName sets the "provider_name" field to the value that was provided on create.
func (u *AuthUpsert) UpdateProviderUserID() *AuthUpsert
UpdateProviderUserID sets the "provider_user_id" field to the value that was provided on create.
func (u *AuthUpsert) UpdateRefreshToken() *AuthUpsert
UpdateRefreshToken sets the "refresh_token" field to the value that was provided on create.
func (u *AuthUpsert) UpdateScope() *AuthUpsert
UpdateScope sets the "scope" field to the value that was provided on create.
func (u *AuthUpsert) UpdateUpdatedAt() *AuthUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
AuthUpsertBulk is the builder for "upsert"-ing a bulk of Auth nodes.
type AuthUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *AuthUpsertBulk) ClearExpireAt() *AuthUpsertBulk
ClearExpireAt clears the value of the "expire_at" field.
func (u *AuthUpsertBulk) ClearOwnerUserID() *AuthUpsertBulk
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (u *AuthUpsertBulk) ClearRefreshToken() *AuthUpsertBulk
ClearRefreshToken clears the value of the "refresh_token" field.
func (u *AuthUpsertBulk) ClearScope() *AuthUpsertBulk
ClearScope clears the value of the "scope" field.
func (u *AuthUpsertBulk) ClearUpdatedAt() *AuthUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *AuthUpsertBulk) DoNothing() *AuthUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *AuthUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *AuthUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *AuthUpsertBulk) Ignore() *AuthUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Auth.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *AuthUpsertBulk) SetAccessToken(v string) *AuthUpsertBulk
SetAccessToken sets the "access_token" field.
func (u *AuthUpsertBulk) SetExpireAt(v time.Time) *AuthUpsertBulk
SetExpireAt sets the "expire_at" field.
func (u *AuthUpsertBulk) SetOwnerUserID(v int) *AuthUpsertBulk
SetOwnerUserID sets the "owner_user_id" field.
func (u *AuthUpsertBulk) SetProviderName(v string) *AuthUpsertBulk
SetProviderName sets the "provider_name" field.
func (u *AuthUpsertBulk) SetProviderUserID(v string) *AuthUpsertBulk
SetProviderUserID sets the "provider_user_id" field.
func (u *AuthUpsertBulk) SetRefreshToken(v string) *AuthUpsertBulk
SetRefreshToken sets the "refresh_token" field.
func (u *AuthUpsertBulk) SetScope(v []string) *AuthUpsertBulk
SetScope sets the "scope" field.
func (u *AuthUpsertBulk) SetUpdatedAt(v time.Time) *AuthUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (u *AuthUpsertBulk) Update(set func(*AuthUpsert)) *AuthUpsertBulk
Update allows overriding fields `UPDATE` values. See the AuthCreateBulk.OnConflict documentation for more info.
func (u *AuthUpsertBulk) UpdateAccessToken() *AuthUpsertBulk
UpdateAccessToken sets the "access_token" field to the value that was provided on create.
func (u *AuthUpsertBulk) UpdateExpireAt() *AuthUpsertBulk
UpdateExpireAt sets the "expire_at" field to the value that was provided on create.
func (u *AuthUpsertBulk) UpdateNewValues() *AuthUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Auth.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *AuthUpsertBulk) UpdateOwnerUserID() *AuthUpsertBulk
UpdateOwnerUserID sets the "owner_user_id" field to the value that was provided on create.
func (u *AuthUpsertBulk) UpdateProviderName() *AuthUpsertBulk
UpdateProviderName sets the "provider_name" field to the value that was provided on create.
func (u *AuthUpsertBulk) UpdateProviderUserID() *AuthUpsertBulk
UpdateProviderUserID sets the "provider_user_id" field to the value that was provided on create.
func (u *AuthUpsertBulk) UpdateRefreshToken() *AuthUpsertBulk
UpdateRefreshToken sets the "refresh_token" field to the value that was provided on create.
func (u *AuthUpsertBulk) UpdateScope() *AuthUpsertBulk
UpdateScope sets the "scope" field to the value that was provided on create.
func (u *AuthUpsertBulk) UpdateUpdatedAt() *AuthUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
AuthUpsertOne is the builder for "upsert"-ing
one Auth node.
type AuthUpsertOne struct {
// contains filtered or unexported fields
}
func (u *AuthUpsertOne) ClearExpireAt() *AuthUpsertOne
ClearExpireAt clears the value of the "expire_at" field.
func (u *AuthUpsertOne) ClearOwnerUserID() *AuthUpsertOne
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (u *AuthUpsertOne) ClearRefreshToken() *AuthUpsertOne
ClearRefreshToken clears the value of the "refresh_token" field.
func (u *AuthUpsertOne) ClearScope() *AuthUpsertOne
ClearScope clears the value of the "scope" field.
func (u *AuthUpsertOne) ClearUpdatedAt() *AuthUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *AuthUpsertOne) DoNothing() *AuthUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *AuthUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *AuthUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *AuthUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *AuthUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *AuthUpsertOne) Ignore() *AuthUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Auth.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *AuthUpsertOne) SetAccessToken(v string) *AuthUpsertOne
SetAccessToken sets the "access_token" field.
func (u *AuthUpsertOne) SetExpireAt(v time.Time) *AuthUpsertOne
SetExpireAt sets the "expire_at" field.
func (u *AuthUpsertOne) SetOwnerUserID(v int) *AuthUpsertOne
SetOwnerUserID sets the "owner_user_id" field.
func (u *AuthUpsertOne) SetProviderName(v string) *AuthUpsertOne
SetProviderName sets the "provider_name" field.
func (u *AuthUpsertOne) SetProviderUserID(v string) *AuthUpsertOne
SetProviderUserID sets the "provider_user_id" field.
func (u *AuthUpsertOne) SetRefreshToken(v string) *AuthUpsertOne
SetRefreshToken sets the "refresh_token" field.
func (u *AuthUpsertOne) SetScope(v []string) *AuthUpsertOne
SetScope sets the "scope" field.
func (u *AuthUpsertOne) SetUpdatedAt(v time.Time) *AuthUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (u *AuthUpsertOne) Update(set func(*AuthUpsert)) *AuthUpsertOne
Update allows overriding fields `UPDATE` values. See the AuthCreate.OnConflict documentation for more info.
func (u *AuthUpsertOne) UpdateAccessToken() *AuthUpsertOne
UpdateAccessToken sets the "access_token" field to the value that was provided on create.
func (u *AuthUpsertOne) UpdateExpireAt() *AuthUpsertOne
UpdateExpireAt sets the "expire_at" field to the value that was provided on create.
func (u *AuthUpsertOne) UpdateNewValues() *AuthUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Auth.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *AuthUpsertOne) UpdateOwnerUserID() *AuthUpsertOne
UpdateOwnerUserID sets the "owner_user_id" field to the value that was provided on create.
func (u *AuthUpsertOne) UpdateProviderName() *AuthUpsertOne
UpdateProviderName sets the "provider_name" field to the value that was provided on create.
func (u *AuthUpsertOne) UpdateProviderUserID() *AuthUpsertOne
UpdateProviderUserID sets the "provider_user_id" field to the value that was provided on create.
func (u *AuthUpsertOne) UpdateRefreshToken() *AuthUpsertOne
UpdateRefreshToken sets the "refresh_token" field to the value that was provided on create.
func (u *AuthUpsertOne) UpdateScope() *AuthUpsertOne
UpdateScope sets the "scope" field to the value that was provided on create.
func (u *AuthUpsertOne) UpdateUpdatedAt() *AuthUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
Auths is a parsable slice of Auth.
type Auths []*Auth
Client is the client that holds all ent builders.
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// Auth is the client for interacting with the Auth builders.
Auth *AuthClient
// HPAmebloPost is the client for interacting with the HPAmebloPost builders.
HPAmebloPost *HPAmebloPostClient
// HPArtist is the client for interacting with the HPArtist builders.
HPArtist *HPArtistClient
// HPAsset is the client for interacting with the HPAsset builders.
HPAsset *HPAssetClient
// HPBlob is the client for interacting with the HPBlob builders.
HPBlob *HPBlobClient
// HPElineupMallItem is the client for interacting with the HPElineupMallItem builders.
HPElineupMallItem *HPElineupMallItemClient
// HPEvent is the client for interacting with the HPEvent builders.
HPEvent *HPEventClient
// HPFCEventTicket is the client for interacting with the HPFCEventTicket builders.
HPFCEventTicket *HPFCEventTicketClient
// HPFeedItem is the client for interacting with the HPFeedItem builders.
HPFeedItem *HPFeedItemClient
// HPFollow is the client for interacting with the HPFollow builders.
HPFollow *HPFollowClient
// HPIgPost is the client for interacting with the HPIgPost builders.
HPIgPost *HPIgPostClient
// HPMember is the client for interacting with the HPMember builders.
HPMember *HPMemberClient
// HPSortHistory is the client for interacting with the HPSortHistory builders.
HPSortHistory *HPSortHistoryClient
// HPViewHistory is the client for interacting with the HPViewHistory builders.
HPViewHistory *HPViewHistoryClient
// TestEnt is the client for interacting with the TestEnt builders.
TestEnt *TestEntClient
// User is the client for interacting with the User builders.
User *UserClient
// UserNotificationLog is the client for interacting with the UserNotificationLog builders.
UserNotificationLog *UserNotificationLogClient
// UserNotificationSetting is the client for interacting with the UserNotificationSetting builders.
UserNotificationSetting *UserNotificationSettingClient
// contains filtered or unexported fields
}
func FromContext(ctx context.Context) *Client
FromContext returns a Client stored inside a context, or nil if there isn't one.
func NewClient(opts ...Option) *Client
NewClient creates a new client configured with the given options.
func Open(driverName, dataSourceName string, options ...Option) (*Client, error)
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
BeginTx returns a transactional client with specified options.
func (c *Client) Close() error
Close closes the database connection and prevents new queries from starting.
func (c *Client) Debug() *Client
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Auth. Query(). Count(ctx)
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
Mutate implements the ent.Mutator interface.
func (c *Client) Noder(ctx context.Context, id int, opts ...NodeOption) (_ Noder, err error)
Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.
c.Noder(ctx, id) c.Noder(ctx, id, ent.WithNodeType(typeResolver))
func (c *Client) Noders(ctx context.Context, ids []int, opts ...NodeOption) ([]Noder, error)
func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)
OpenTx opens a transaction and returns a transactional context along with the created transaction.
func (c *Client) Tx(ctx context.Context) (*Tx, error)
Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.
func (c *Client) Use(hooks ...Hook)
Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitFunc func(context.Context, *Tx) error
func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error
Commit calls f(ctx, m).
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer {
return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Commit(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type CommitHook func(Committer) Committer
Committer is the interface that wraps the Commit method.
type Committer interface {
Commit(context.Context, *Tx) error
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
type ConstraintError struct {
// contains filtered or unexported fields
}
func (e ConstraintError) Error() string
Error implements the error interface.
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Common entgql types.
type Cursor = entgql.Cursor[int]
HPAmebloPost is the model entity for the HPAmebloPost schema.
type HPAmebloPost struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CrawledAt holds the value of the "crawled_at" field.
CrawledAt *time.Time `json:"crawled_at,omitempty"`
// ErrorCount holds the value of the "error_count" field.
ErrorCount int `json:"error_count,omitempty"`
// ManuallyModified holds the value of the "manually_modified" field.
ManuallyModified *jsonfields.ManuallyModified `json:"manually_modified,omitempty"`
// LastErrorMessage holds the value of the "last_error_message" field.
LastErrorMessage *string `json:"last_error_message,omitempty"`
// RecrawlRequired holds the value of the "recrawl_required" field.
RecrawlRequired bool `json:"recrawl_required,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Path holds the value of the "path" field.
Path string `json:"path,omitempty"`
// NextPath holds the value of the "next_path" field.
NextPath *string `json:"next_path,omitempty"`
// PrevPath holds the value of the "prev_path" field.
PrevPath *string `json:"prev_path,omitempty"`
// ArtistKey holds the value of the "artist_key" field.
ArtistKey string `json:"artist_key,omitempty"`
// MemberKey holds the value of the "member_key" field.
MemberKey *string `json:"member_key,omitempty"`
// Title holds the value of the "title" field.
Title string `json:"title,omitempty"`
// Description holds the value of the "description" field.
Description string `json:"description,omitempty"`
// Theme holds the value of the "theme" field.
Theme *string `json:"theme,omitempty"`
// PostAt holds the value of the "post_at" field.
PostAt time.Time `json:"post_at,omitempty"`
// Source holds the value of the "source" field.
Source hpameblopost.Source `json:"source,omitempty"`
// Images holds the value of the "images" field.
Images []jsonfields.Media `json:"images,omitempty"`
// Likes holds the value of the "likes" field.
Likes *int `json:"likes,omitempty"`
// Comments holds the value of the "comments" field.
Comments *int `json:"comments,omitempty"`
// Reblogs holds the value of the "reblogs" field.
Reblogs *int `json:"reblogs,omitempty"`
// OwnerArtistID holds the value of the "owner_artist_id" field.
OwnerArtistID *int `json:"owner_artist_id,omitempty"`
// OwnerMemberID holds the value of the "owner_member_id" field.
OwnerMemberID *int `json:"owner_member_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the HPAmebloPostQuery when eager-loading is set.
Edges HPAmebloPostEdges `json:"edges"`
// contains filtered or unexported fields
}
func (hap *HPAmebloPost) Blobs(ctx context.Context) (result []*HPBlob, err error)
func (n *HPAmebloPost) IsNode()
IsNode implements the Node interface check for GQLGen.
func (hap *HPAmebloPost) NamedBlobs(name string) ([]*HPBlob, error)
NamedBlobs returns the Blobs named value or an error if the edge was not loaded in eager-loading with this name.
func (hap *HPAmebloPost) NamedTaggedArtists(name string) ([]*HPArtist, error)
NamedTaggedArtists returns the TaggedArtists named value or an error if the edge was not loaded in eager-loading with this name.
func (hap *HPAmebloPost) NamedTaggedMembers(name string) ([]*HPMember, error)
NamedTaggedMembers returns the TaggedMembers named value or an error if the edge was not loaded in eager-loading with this name.
func (hap *HPAmebloPost) OwnerArtist(ctx context.Context) (*HPArtist, error)
func (hap *HPAmebloPost) OwnerMember(ctx context.Context) (*HPMember, error)
func (hap *HPAmebloPost) QueryAsset() *HPAssetQuery
QueryAsset queries the "asset" edge of the HPAmebloPost entity.
func (hap *HPAmebloPost) QueryBlobs() *HPBlobQuery
QueryBlobs queries the "blobs" edge of the HPAmebloPost entity.
func (hap *HPAmebloPost) QueryOwnerArtist() *HPArtistQuery
QueryOwnerArtist queries the "owner_artist" edge of the HPAmebloPost entity.
func (hap *HPAmebloPost) QueryOwnerMember() *HPMemberQuery
QueryOwnerMember queries the "owner_member" edge of the HPAmebloPost entity.
func (hap *HPAmebloPost) QueryTaggedArtists() *HPArtistQuery
QueryTaggedArtists queries the "tagged_artists" edge of the HPAmebloPost entity.
func (hap *HPAmebloPost) QueryTaggedMembers() *HPMemberQuery
QueryTaggedMembers queries the "tagged_members" edge of the HPAmebloPost entity.
func (hap *HPAmebloPost) String() string
String implements the fmt.Stringer.
func (hap *HPAmebloPost) TaggedArtists(ctx context.Context) (result []*HPArtist, err error)
func (hap *HPAmebloPost) TaggedMembers(ctx context.Context) (result []*HPMember, err error)
func (hap *HPAmebloPost) ToEdge(order *HPAmebloPostOrder) *HPAmebloPostEdge
ToEdge converts HPAmebloPost into HPAmebloPostEdge.
func (hap *HPAmebloPost) Unwrap() *HPAmebloPost
Unwrap unwraps the HPAmebloPost entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (hap *HPAmebloPost) Update() *HPAmebloPostUpdateOne
Update returns a builder for updating this HPAmebloPost. Note that you need to call HPAmebloPost.Unwrap() before calling this method if this HPAmebloPost was returned from a transaction, and the transaction was committed or rolled back.
func (hap *HPAmebloPost) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the HPAmebloPost. This includes values selected through modifiers, order, etc.
HPAmebloPostClient is a client for the HPAmebloPost schema.
type HPAmebloPostClient struct {
// contains filtered or unexported fields
}
func NewHPAmebloPostClient(c config) *HPAmebloPostClient
NewHPAmebloPostClient returns a client for the HPAmebloPost from the given config.
func (c *HPAmebloPostClient) Create() *HPAmebloPostCreate
Create returns a builder for creating a HPAmebloPost entity.
func (c *HPAmebloPostClient) CreateBulk(builders ...*HPAmebloPostCreate) *HPAmebloPostCreateBulk
CreateBulk returns a builder for creating a bulk of HPAmebloPost entities.
func (c *HPAmebloPostClient) Delete() *HPAmebloPostDelete
Delete returns a delete builder for HPAmebloPost.
func (c *HPAmebloPostClient) DeleteOne(hap *HPAmebloPost) *HPAmebloPostDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *HPAmebloPostClient) DeleteOneID(id int) *HPAmebloPostDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *HPAmebloPostClient) Get(ctx context.Context, id int) (*HPAmebloPost, error)
Get returns a HPAmebloPost entity by its id.
func (c *HPAmebloPostClient) GetX(ctx context.Context, id int) *HPAmebloPost
GetX is like Get, but panics if an error occurs.
func (c *HPAmebloPostClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *HPAmebloPostClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hpameblopost.Intercept(f(g(h())))`.
func (c *HPAmebloPostClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *HPAmebloPostClient) Query() *HPAmebloPostQuery
Query returns a query builder for HPAmebloPost.
func (c *HPAmebloPostClient) QueryAsset(hap *HPAmebloPost) *HPAssetQuery
QueryAsset queries the asset edge of a HPAmebloPost.
func (c *HPAmebloPostClient) QueryBlobs(hap *HPAmebloPost) *HPBlobQuery
QueryBlobs queries the blobs edge of a HPAmebloPost.
func (c *HPAmebloPostClient) QueryOwnerArtist(hap *HPAmebloPost) *HPArtistQuery
QueryOwnerArtist queries the owner_artist edge of a HPAmebloPost.
func (c *HPAmebloPostClient) QueryOwnerMember(hap *HPAmebloPost) *HPMemberQuery
QueryOwnerMember queries the owner_member edge of a HPAmebloPost.
func (c *HPAmebloPostClient) QueryTaggedArtists(hap *HPAmebloPost) *HPArtistQuery
QueryTaggedArtists queries the tagged_artists edge of a HPAmebloPost.
func (c *HPAmebloPostClient) QueryTaggedMembers(hap *HPAmebloPost) *HPMemberQuery
QueryTaggedMembers queries the tagged_members edge of a HPAmebloPost.
func (c *HPAmebloPostClient) Update() *HPAmebloPostUpdate
Update returns an update builder for HPAmebloPost.
func (c *HPAmebloPostClient) UpdateOne(hap *HPAmebloPost) *HPAmebloPostUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *HPAmebloPostClient) UpdateOneID(id int) *HPAmebloPostUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *HPAmebloPostClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hpameblopost.Hooks(f(g(h())))`.
HPAmebloPostConnection is the connection containing edges to HPAmebloPost.
type HPAmebloPostConnection struct {
Edges []*HPAmebloPostEdge `json:"edges"`
PageInfo PageInfo `json:"pageInfo"`
TotalCount int `json:"totalCount"`
}
HPAmebloPostCreate is the builder for creating a HPAmebloPost entity.
type HPAmebloPostCreate struct {
// contains filtered or unexported fields
}
func (hapc *HPAmebloPostCreate) AddBlobIDs(ids ...int) *HPAmebloPostCreate
AddBlobIDs adds the "blobs" edge to the HPBlob entity by IDs.
func (hapc *HPAmebloPostCreate) AddBlobs(h ...*HPBlob) *HPAmebloPostCreate
AddBlobs adds the "blobs" edges to the HPBlob entity.
func (hapc *HPAmebloPostCreate) AddTaggedArtistIDs(ids ...int) *HPAmebloPostCreate
AddTaggedArtistIDs adds the "tagged_artists" edge to the HPArtist entity by IDs.
func (hapc *HPAmebloPostCreate) AddTaggedArtists(h ...*HPArtist) *HPAmebloPostCreate
AddTaggedArtists adds the "tagged_artists" edges to the HPArtist entity.
func (hapc *HPAmebloPostCreate) AddTaggedMemberIDs(ids ...int) *HPAmebloPostCreate
AddTaggedMemberIDs adds the "tagged_members" edge to the HPMember entity by IDs.
func (hapc *HPAmebloPostCreate) AddTaggedMembers(h ...*HPMember) *HPAmebloPostCreate
AddTaggedMembers adds the "tagged_members" edges to the HPMember entity.
func (hapc *HPAmebloPostCreate) Exec(ctx context.Context) error
Exec executes the query.
func (hapc *HPAmebloPostCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hapc *HPAmebloPostCreate) Mutation() *HPAmebloPostMutation
Mutation returns the HPAmebloPostMutation object of the builder.
func (hapc *HPAmebloPostCreate) OnConflict(opts ...sql.ConflictOption) *HPAmebloPostUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPAmebloPost.Create().
SetCrawledAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPAmebloPostUpsert) {
SetCrawledAt(v+v).
}).
Exec(ctx)
func (hapc *HPAmebloPostCreate) OnConflictColumns(columns ...string) *HPAmebloPostUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPAmebloPost.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hapc *HPAmebloPostCreate) Save(ctx context.Context) (*HPAmebloPost, error)
Save creates the HPAmebloPost in the database.
func (hapc *HPAmebloPostCreate) SaveX(ctx context.Context) *HPAmebloPost
SaveX calls Save and panics if Save returns an error.
func (hapc *HPAmebloPostCreate) SetArtistKey(s string) *HPAmebloPostCreate
SetArtistKey sets the "artist_key" field.
func (hapc *HPAmebloPostCreate) SetAsset(h *HPAsset) *HPAmebloPostCreate
SetAsset sets the "asset" edge to the HPAsset entity.
func (hapc *HPAmebloPostCreate) SetAssetID(id int) *HPAmebloPostCreate
SetAssetID sets the "asset" edge to the HPAsset entity by ID.
func (hapc *HPAmebloPostCreate) SetComments(i int) *HPAmebloPostCreate
SetComments sets the "comments" field.
func (hapc *HPAmebloPostCreate) SetCrawledAt(t time.Time) *HPAmebloPostCreate
SetCrawledAt sets the "crawled_at" field.
func (hapc *HPAmebloPostCreate) SetCreatedAt(t time.Time) *HPAmebloPostCreate
SetCreatedAt sets the "created_at" field.
func (hapc *HPAmebloPostCreate) SetDescription(s string) *HPAmebloPostCreate
SetDescription sets the "description" field.
func (hapc *HPAmebloPostCreate) SetErrorCount(i int) *HPAmebloPostCreate
SetErrorCount sets the "error_count" field.
func (hapc *HPAmebloPostCreate) SetImages(j []jsonfields.Media) *HPAmebloPostCreate
SetImages sets the "images" field.
func (hapc *HPAmebloPostCreate) SetLastErrorMessage(s string) *HPAmebloPostCreate
SetLastErrorMessage sets the "last_error_message" field.
func (hapc *HPAmebloPostCreate) SetLikes(i int) *HPAmebloPostCreate
SetLikes sets the "likes" field.
func (hapc *HPAmebloPostCreate) SetManuallyModified(jm *jsonfields.ManuallyModified) *HPAmebloPostCreate
SetManuallyModified sets the "manually_modified" field.
func (hapc *HPAmebloPostCreate) SetMemberKey(s string) *HPAmebloPostCreate
SetMemberKey sets the "member_key" field.
func (hapc *HPAmebloPostCreate) SetNextPath(s string) *HPAmebloPostCreate
SetNextPath sets the "next_path" field.
func (hapc *HPAmebloPostCreate) SetNillableAssetID(id *int) *HPAmebloPostCreate
SetNillableAssetID sets the "asset" edge to the HPAsset entity by ID if the given value is not nil.
func (hapc *HPAmebloPostCreate) SetNillableComments(i *int) *HPAmebloPostCreate
SetNillableComments sets the "comments" field if the given value is not nil.
func (hapc *HPAmebloPostCreate) SetNillableCrawledAt(t *time.Time) *HPAmebloPostCreate
SetNillableCrawledAt sets the "crawled_at" field if the given value is not nil.
func (hapc *HPAmebloPostCreate) SetNillableCreatedAt(t *time.Time) *HPAmebloPostCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (hapc *HPAmebloPostCreate) SetNillableErrorCount(i *int) *HPAmebloPostCreate
SetNillableErrorCount sets the "error_count" field if the given value is not nil.
func (hapc *HPAmebloPostCreate) SetNillableLastErrorMessage(s *string) *HPAmebloPostCreate
SetNillableLastErrorMessage sets the "last_error_message" field if the given value is not nil.
func (hapc *HPAmebloPostCreate) SetNillableLikes(i *int) *HPAmebloPostCreate
SetNillableLikes sets the "likes" field if the given value is not nil.
func (hapc *HPAmebloPostCreate) SetNillableMemberKey(s *string) *HPAmebloPostCreate
SetNillableMemberKey sets the "member_key" field if the given value is not nil.
func (hapc *HPAmebloPostCreate) SetNillableNextPath(s *string) *HPAmebloPostCreate
SetNillableNextPath sets the "next_path" field if the given value is not nil.
func (hapc *HPAmebloPostCreate) SetNillableOwnerArtistID(i *int) *HPAmebloPostCreate
SetNillableOwnerArtistID sets the "owner_artist_id" field if the given value is not nil.
func (hapc *HPAmebloPostCreate) SetNillableOwnerMemberID(i *int) *HPAmebloPostCreate
SetNillableOwnerMemberID sets the "owner_member_id" field if the given value is not nil.
func (hapc *HPAmebloPostCreate) SetNillablePrevPath(s *string) *HPAmebloPostCreate
SetNillablePrevPath sets the "prev_path" field if the given value is not nil.
func (hapc *HPAmebloPostCreate) SetNillableReblogs(i *int) *HPAmebloPostCreate
SetNillableReblogs sets the "reblogs" field if the given value is not nil.
func (hapc *HPAmebloPostCreate) SetNillableRecrawlRequired(b *bool) *HPAmebloPostCreate
SetNillableRecrawlRequired sets the "recrawl_required" field if the given value is not nil.
func (hapc *HPAmebloPostCreate) SetNillableTheme(s *string) *HPAmebloPostCreate
SetNillableTheme sets the "theme" field if the given value is not nil.
func (hapc *HPAmebloPostCreate) SetNillableUpdatedAt(t *time.Time) *HPAmebloPostCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hapc *HPAmebloPostCreate) SetOwnerArtist(h *HPArtist) *HPAmebloPostCreate
SetOwnerArtist sets the "owner_artist" edge to the HPArtist entity.
func (hapc *HPAmebloPostCreate) SetOwnerArtistID(i int) *HPAmebloPostCreate
SetOwnerArtistID sets the "owner_artist_id" field.
func (hapc *HPAmebloPostCreate) SetOwnerMember(h *HPMember) *HPAmebloPostCreate
SetOwnerMember sets the "owner_member" edge to the HPMember entity.
func (hapc *HPAmebloPostCreate) SetOwnerMemberID(i int) *HPAmebloPostCreate
SetOwnerMemberID sets the "owner_member_id" field.
func (hapc *HPAmebloPostCreate) SetPath(s string) *HPAmebloPostCreate
SetPath sets the "path" field.
func (hapc *HPAmebloPostCreate) SetPostAt(t time.Time) *HPAmebloPostCreate
SetPostAt sets the "post_at" field.
func (hapc *HPAmebloPostCreate) SetPrevPath(s string) *HPAmebloPostCreate
SetPrevPath sets the "prev_path" field.
func (hapc *HPAmebloPostCreate) SetReblogs(i int) *HPAmebloPostCreate
SetReblogs sets the "reblogs" field.
func (hapc *HPAmebloPostCreate) SetRecrawlRequired(b bool) *HPAmebloPostCreate
SetRecrawlRequired sets the "recrawl_required" field.
func (hapc *HPAmebloPostCreate) SetSource(h hpameblopost.Source) *HPAmebloPostCreate
SetSource sets the "source" field.
func (hapc *HPAmebloPostCreate) SetTheme(s string) *HPAmebloPostCreate
SetTheme sets the "theme" field.
func (hapc *HPAmebloPostCreate) SetTitle(s string) *HPAmebloPostCreate
SetTitle sets the "title" field.
func (hapc *HPAmebloPostCreate) SetUpdatedAt(t time.Time) *HPAmebloPostCreate
SetUpdatedAt sets the "updated_at" field.
HPAmebloPostCreateBulk is the builder for creating many HPAmebloPost entities in bulk.
type HPAmebloPostCreateBulk struct {
// contains filtered or unexported fields
}
func (hapcb *HPAmebloPostCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (hapcb *HPAmebloPostCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hapcb *HPAmebloPostCreateBulk) OnConflict(opts ...sql.ConflictOption) *HPAmebloPostUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPAmebloPost.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPAmebloPostUpsert) {
SetCrawledAt(v+v).
}).
Exec(ctx)
func (hapcb *HPAmebloPostCreateBulk) OnConflictColumns(columns ...string) *HPAmebloPostUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPAmebloPost.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hapcb *HPAmebloPostCreateBulk) Save(ctx context.Context) ([]*HPAmebloPost, error)
Save creates the HPAmebloPost entities in the database.
func (hapcb *HPAmebloPostCreateBulk) SaveX(ctx context.Context) []*HPAmebloPost
SaveX is like Save, but panics if an error occurs.
HPAmebloPostDelete is the builder for deleting a HPAmebloPost entity.
type HPAmebloPostDelete struct {
// contains filtered or unexported fields
}
func (hapd *HPAmebloPostDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (hapd *HPAmebloPostDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (hapd *HPAmebloPostDelete) Where(ps ...predicate.HPAmebloPost) *HPAmebloPostDelete
Where appends a list predicates to the HPAmebloPostDelete builder.
HPAmebloPostDeleteOne is the builder for deleting a single HPAmebloPost entity.
type HPAmebloPostDeleteOne struct {
// contains filtered or unexported fields
}
func (hapdo *HPAmebloPostDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (hapdo *HPAmebloPostDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hapdo *HPAmebloPostDeleteOne) Where(ps ...predicate.HPAmebloPost) *HPAmebloPostDeleteOne
Where appends a list predicates to the HPAmebloPostDelete builder.
HPAmebloPostEdge is the edge representation of HPAmebloPost.
type HPAmebloPostEdge struct {
Node *HPAmebloPost `json:"node"`
Cursor Cursor `json:"cursor"`
}
HPAmebloPostEdges holds the relations/edges for other nodes in the graph.
type HPAmebloPostEdges struct {
// OwnerArtist holds the value of the owner_artist edge.
OwnerArtist *HPArtist `json:"owner_artist,omitempty"`
// OwnerMember holds the value of the owner_member edge.
OwnerMember *HPMember `json:"owner_member,omitempty"`
// TaggedArtists holds the value of the tagged_artists edge.
TaggedArtists []*HPArtist `json:"tagged_artists,omitempty"`
// TaggedMembers holds the value of the tagged_members edge.
TaggedMembers []*HPMember `json:"tagged_members,omitempty"`
// Asset holds the value of the asset edge.
Asset *HPAsset `json:"asset,omitempty"`
// Blobs holds the value of the blobs edge.
Blobs []*HPBlob `json:"blobs,omitempty"`
// contains filtered or unexported fields
}
func (e HPAmebloPostEdges) AssetOrErr() (*HPAsset, error)
AssetOrErr returns the Asset value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (e HPAmebloPostEdges) BlobsOrErr() ([]*HPBlob, error)
BlobsOrErr returns the Blobs value or an error if the edge was not loaded in eager-loading.
func (e HPAmebloPostEdges) OwnerArtistOrErr() (*HPArtist, error)
OwnerArtistOrErr returns the OwnerArtist value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (e HPAmebloPostEdges) OwnerMemberOrErr() (*HPMember, error)
OwnerMemberOrErr returns the OwnerMember value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (e HPAmebloPostEdges) TaggedArtistsOrErr() ([]*HPArtist, error)
TaggedArtistsOrErr returns the TaggedArtists value or an error if the edge was not loaded in eager-loading.
func (e HPAmebloPostEdges) TaggedMembersOrErr() ([]*HPMember, error)
TaggedMembersOrErr returns the TaggedMembers value or an error if the edge was not loaded in eager-loading.
HPAmebloPostFilter provides a generic filtering capability at runtime for HPAmebloPostQuery.
type HPAmebloPostFilter struct {
// contains filtered or unexported fields
}
func (f *HPAmebloPostFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *HPAmebloPostFilter) WhereArtistKey(p entql.StringP)
WhereArtistKey applies the entql string predicate on the artist_key field.
func (f *HPAmebloPostFilter) WhereComments(p entql.IntP)
WhereComments applies the entql int predicate on the comments field.
func (f *HPAmebloPostFilter) WhereCrawledAt(p entql.TimeP)
WhereCrawledAt applies the entql time.Time predicate on the crawled_at field.
func (f *HPAmebloPostFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (f *HPAmebloPostFilter) WhereDescription(p entql.StringP)
WhereDescription applies the entql string predicate on the description field.
func (f *HPAmebloPostFilter) WhereErrorCount(p entql.IntP)
WhereErrorCount applies the entql int predicate on the error_count field.
func (f *HPAmebloPostFilter) WhereHasAsset()
WhereHasAsset applies a predicate to check if query has an edge asset.
func (f *HPAmebloPostFilter) WhereHasAssetWith(preds ...predicate.HPAsset)
WhereHasAssetWith applies a predicate to check if query has an edge asset with a given conditions (other predicates).
func (f *HPAmebloPostFilter) WhereHasBlobs()
WhereHasBlobs applies a predicate to check if query has an edge blobs.
func (f *HPAmebloPostFilter) WhereHasBlobsWith(preds ...predicate.HPBlob)
WhereHasBlobsWith applies a predicate to check if query has an edge blobs with a given conditions (other predicates).
func (f *HPAmebloPostFilter) WhereHasOwnerArtist()
WhereHasOwnerArtist applies a predicate to check if query has an edge owner_artist.
func (f *HPAmebloPostFilter) WhereHasOwnerArtistWith(preds ...predicate.HPArtist)
WhereHasOwnerArtistWith applies a predicate to check if query has an edge owner_artist with a given conditions (other predicates).
func (f *HPAmebloPostFilter) WhereHasOwnerMember()
WhereHasOwnerMember applies a predicate to check if query has an edge owner_member.
func (f *HPAmebloPostFilter) WhereHasOwnerMemberWith(preds ...predicate.HPMember)
WhereHasOwnerMemberWith applies a predicate to check if query has an edge owner_member with a given conditions (other predicates).
func (f *HPAmebloPostFilter) WhereHasTaggedArtists()
WhereHasTaggedArtists applies a predicate to check if query has an edge tagged_artists.
func (f *HPAmebloPostFilter) WhereHasTaggedArtistsWith(preds ...predicate.HPArtist)
WhereHasTaggedArtistsWith applies a predicate to check if query has an edge tagged_artists with a given conditions (other predicates).
func (f *HPAmebloPostFilter) WhereHasTaggedMembers()
WhereHasTaggedMembers applies a predicate to check if query has an edge tagged_members.
func (f *HPAmebloPostFilter) WhereHasTaggedMembersWith(preds ...predicate.HPMember)
WhereHasTaggedMembersWith applies a predicate to check if query has an edge tagged_members with a given conditions (other predicates).
func (f *HPAmebloPostFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *HPAmebloPostFilter) WhereImages(p entql.BytesP)
WhereImages applies the entql json.RawMessage predicate on the images field.
func (f *HPAmebloPostFilter) WhereLastErrorMessage(p entql.StringP)
WhereLastErrorMessage applies the entql string predicate on the last_error_message field.
func (f *HPAmebloPostFilter) WhereLikes(p entql.IntP)
WhereLikes applies the entql int predicate on the likes field.
func (f *HPAmebloPostFilter) WhereManuallyModified(p entql.BytesP)
WhereManuallyModified applies the entql json.RawMessage predicate on the manually_modified field.
func (f *HPAmebloPostFilter) WhereMemberKey(p entql.StringP)
WhereMemberKey applies the entql string predicate on the member_key field.
func (f *HPAmebloPostFilter) WhereNextPath(p entql.StringP)
WhereNextPath applies the entql string predicate on the next_path field.
func (f *HPAmebloPostFilter) WhereOwnerArtistID(p entql.IntP)
WhereOwnerArtistID applies the entql int predicate on the owner_artist_id field.
func (f *HPAmebloPostFilter) WhereOwnerMemberID(p entql.IntP)
WhereOwnerMemberID applies the entql int predicate on the owner_member_id field.
func (f *HPAmebloPostFilter) WherePath(p entql.StringP)
WherePath applies the entql string predicate on the path field.
func (f *HPAmebloPostFilter) WherePostAt(p entql.TimeP)
WherePostAt applies the entql time.Time predicate on the post_at field.
func (f *HPAmebloPostFilter) WherePrevPath(p entql.StringP)
WherePrevPath applies the entql string predicate on the prev_path field.
func (f *HPAmebloPostFilter) WhereReblogs(p entql.IntP)
WhereReblogs applies the entql int predicate on the reblogs field.
func (f *HPAmebloPostFilter) WhereRecrawlRequired(p entql.BoolP)
WhereRecrawlRequired applies the entql bool predicate on the recrawl_required field.
func (f *HPAmebloPostFilter) WhereSource(p entql.StringP)
WhereSource applies the entql string predicate on the source field.
func (f *HPAmebloPostFilter) WhereTheme(p entql.StringP)
WhereTheme applies the entql string predicate on the theme field.
func (f *HPAmebloPostFilter) WhereTitle(p entql.StringP)
WhereTitle applies the entql string predicate on the title field.
func (f *HPAmebloPostFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
HPAmebloPostGroupBy is the group-by builder for HPAmebloPost entities.
type HPAmebloPostGroupBy struct {
// contains filtered or unexported fields
}
func (hapgb *HPAmebloPostGroupBy) Aggregate(fns ...AggregateFunc) *HPAmebloPostGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *HPAmebloPostGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPAmebloPostGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPAmebloPostGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPAmebloPostGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPAmebloPostGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPAmebloPostGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPAmebloPostGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPAmebloPostGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPAmebloPostGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPAmebloPostGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPAmebloPostGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPAmebloPostGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hapgb *HPAmebloPostGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPAmebloPostGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPAmebloPostGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPAmebloPostGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPAmebloPostGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPAmebloPostGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPAmebloPostMutation represents an operation that mutates the HPAmebloPost nodes in the graph.
type HPAmebloPostMutation struct {
// contains filtered or unexported fields
}
func (m *HPAmebloPostMutation) AddBlobIDs(ids ...int)
AddBlobIDs adds the "blobs" edge to the HPBlob entity by ids.
func (m *HPAmebloPostMutation) AddComments(i int)
AddComments adds i to the "comments" field.
func (m *HPAmebloPostMutation) AddErrorCount(i int)
AddErrorCount adds i to the "error_count" field.
func (m *HPAmebloPostMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPAmebloPostMutation) AddLikes(i int)
AddLikes adds i to the "likes" field.
func (m *HPAmebloPostMutation) AddReblogs(i int)
AddReblogs adds i to the "reblogs" field.
func (m *HPAmebloPostMutation) AddTaggedArtistIDs(ids ...int)
AddTaggedArtistIDs adds the "tagged_artists" edge to the HPArtist entity by ids.
func (m *HPAmebloPostMutation) AddTaggedMemberIDs(ids ...int)
AddTaggedMemberIDs adds the "tagged_members" edge to the HPMember entity by ids.
func (m *HPAmebloPostMutation) AddedComments() (r int, exists bool)
AddedComments returns the value that was added to the "comments" field in this mutation.
func (m *HPAmebloPostMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *HPAmebloPostMutation) AddedErrorCount() (r int, exists bool)
AddedErrorCount returns the value that was added to the "error_count" field in this mutation.
func (m *HPAmebloPostMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPAmebloPostMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *HPAmebloPostMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *HPAmebloPostMutation) AddedLikes() (r int, exists bool)
AddedLikes returns the value that was added to the "likes" field in this mutation.
func (m *HPAmebloPostMutation) AddedReblogs() (r int, exists bool)
AddedReblogs returns the value that was added to the "reblogs" field in this mutation.
func (m *HPAmebloPostMutation) AppendImages(j []jsonfields.Media)
AppendImages adds j to the "images" field.
func (m *HPAmebloPostMutation) AppendedImages() ([]jsonfields.Media, bool)
AppendedImages returns the list of values that were appended to the "images" field in this mutation.
func (m *HPAmebloPostMutation) ArtistKey() (r string, exists bool)
ArtistKey returns the value of the "artist_key" field in the mutation.
func (m *HPAmebloPostMutation) AssetCleared() bool
AssetCleared reports if the "asset" edge to the HPAsset entity was cleared.
func (m *HPAmebloPostMutation) AssetID() (id int, exists bool)
AssetID returns the "asset" edge ID in the mutation.
func (m *HPAmebloPostMutation) AssetIDs() (ids []int)
AssetIDs returns the "asset" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AssetID instead. It exists only for internal usage by the builders.
func (m *HPAmebloPostMutation) BlobsCleared() bool
BlobsCleared reports if the "blobs" edge to the HPBlob entity was cleared.
func (m *HPAmebloPostMutation) BlobsIDs() (ids []int)
BlobsIDs returns the "blobs" edge IDs in the mutation.
func (m *HPAmebloPostMutation) ClearAsset()
ClearAsset clears the "asset" edge to the HPAsset entity.
func (m *HPAmebloPostMutation) ClearBlobs()
ClearBlobs clears the "blobs" edge to the HPBlob entity.
func (m *HPAmebloPostMutation) ClearComments()
ClearComments clears the value of the "comments" field.
func (m *HPAmebloPostMutation) ClearCrawledAt()
ClearCrawledAt clears the value of the "crawled_at" field.
func (m *HPAmebloPostMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (m *HPAmebloPostMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *HPAmebloPostMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPAmebloPostMutation) ClearImages()
ClearImages clears the value of the "images" field.
func (m *HPAmebloPostMutation) ClearLastErrorMessage()
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (m *HPAmebloPostMutation) ClearLikes()
ClearLikes clears the value of the "likes" field.
func (m *HPAmebloPostMutation) ClearManuallyModified()
ClearManuallyModified clears the value of the "manually_modified" field.
func (m *HPAmebloPostMutation) ClearMemberKey()
ClearMemberKey clears the value of the "member_key" field.
func (m *HPAmebloPostMutation) ClearNextPath()
ClearNextPath clears the value of the "next_path" field.
func (m *HPAmebloPostMutation) ClearOwnerArtist()
ClearOwnerArtist clears the "owner_artist" edge to the HPArtist entity.
func (m *HPAmebloPostMutation) ClearOwnerArtistID()
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (m *HPAmebloPostMutation) ClearOwnerMember()
ClearOwnerMember clears the "owner_member" edge to the HPMember entity.
func (m *HPAmebloPostMutation) ClearOwnerMemberID()
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (m *HPAmebloPostMutation) ClearPrevPath()
ClearPrevPath clears the value of the "prev_path" field.
func (m *HPAmebloPostMutation) ClearReblogs()
ClearReblogs clears the value of the "reblogs" field.
func (m *HPAmebloPostMutation) ClearRecrawlRequired()
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (m *HPAmebloPostMutation) ClearTaggedArtists()
ClearTaggedArtists clears the "tagged_artists" edge to the HPArtist entity.
func (m *HPAmebloPostMutation) ClearTaggedMembers()
ClearTaggedMembers clears the "tagged_members" edge to the HPMember entity.
func (m *HPAmebloPostMutation) ClearTheme()
ClearTheme clears the value of the "theme" field.
func (m *HPAmebloPostMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (m *HPAmebloPostMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *HPAmebloPostMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m HPAmebloPostMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *HPAmebloPostMutation) Comments() (r int, exists bool)
Comments returns the value of the "comments" field in the mutation.
func (m *HPAmebloPostMutation) CommentsCleared() bool
CommentsCleared returns if the "comments" field was cleared in this mutation.
func (m *HPAmebloPostMutation) CrawledAt() (r time.Time, exists bool)
CrawledAt returns the value of the "crawled_at" field in the mutation.
func (m *HPAmebloPostMutation) CrawledAtCleared() bool
CrawledAtCleared returns if the "crawled_at" field was cleared in this mutation.
func (m *HPAmebloPostMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (m *HPAmebloPostMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (m *HPAmebloPostMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (m *HPAmebloPostMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *HPAmebloPostMutation) ErrorCount() (r int, exists bool)
ErrorCount returns the value of the "error_count" field in the mutation.
func (m *HPAmebloPostMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPAmebloPostMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *HPAmebloPostMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *HPAmebloPostMutation) Filter() *HPAmebloPostFilter
Filter returns an entql.Where implementation to apply filters on the HPAmebloPostMutation builder.
func (m *HPAmebloPostMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *HPAmebloPostMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *HPAmebloPostMutation) Images() (r []jsonfields.Media, exists bool)
Images returns the value of the "images" field in the mutation.
func (m *HPAmebloPostMutation) ImagesCleared() bool
ImagesCleared returns if the "images" field was cleared in this mutation.
func (m *HPAmebloPostMutation) LastErrorMessage() (r string, exists bool)
LastErrorMessage returns the value of the "last_error_message" field in the mutation.
func (m *HPAmebloPostMutation) LastErrorMessageCleared() bool
LastErrorMessageCleared returns if the "last_error_message" field was cleared in this mutation.
func (m *HPAmebloPostMutation) Likes() (r int, exists bool)
Likes returns the value of the "likes" field in the mutation.
func (m *HPAmebloPostMutation) LikesCleared() bool
LikesCleared returns if the "likes" field was cleared in this mutation.
func (m *HPAmebloPostMutation) ManuallyModified() (r *jsonfields.ManuallyModified, exists bool)
ManuallyModified returns the value of the "manually_modified" field in the mutation.
func (m *HPAmebloPostMutation) ManuallyModifiedCleared() bool
ManuallyModifiedCleared returns if the "manually_modified" field was cleared in this mutation.
func (m *HPAmebloPostMutation) MemberKey() (r string, exists bool)
MemberKey returns the value of the "member_key" field in the mutation.
func (m *HPAmebloPostMutation) MemberKeyCleared() bool
MemberKeyCleared returns if the "member_key" field was cleared in this mutation.
func (m *HPAmebloPostMutation) NextPath() (r string, exists bool)
NextPath returns the value of the "next_path" field in the mutation.
func (m *HPAmebloPostMutation) NextPathCleared() bool
NextPathCleared returns if the "next_path" field was cleared in this mutation.
func (m *HPAmebloPostMutation) OldArtistKey(ctx context.Context) (v string, err error)
OldArtistKey returns the old "artist_key" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldComments(ctx context.Context) (v *int, err error)
OldComments returns the old "comments" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldCrawledAt(ctx context.Context) (v *time.Time, err error)
OldCrawledAt returns the old "crawled_at" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
OldCreatedAt returns the old "created_at" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldErrorCount(ctx context.Context) (v int, err error)
OldErrorCount returns the old "error_count" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *HPAmebloPostMutation) OldImages(ctx context.Context) (v []jsonfields.Media, err error)
OldImages returns the old "images" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldLastErrorMessage(ctx context.Context) (v *string, err error)
OldLastErrorMessage returns the old "last_error_message" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldLikes(ctx context.Context) (v *int, err error)
OldLikes returns the old "likes" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldManuallyModified(ctx context.Context) (v *jsonfields.ManuallyModified, err error)
OldManuallyModified returns the old "manually_modified" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldMemberKey(ctx context.Context) (v *string, err error)
OldMemberKey returns the old "member_key" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldNextPath(ctx context.Context) (v *string, err error)
OldNextPath returns the old "next_path" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldOwnerArtistID(ctx context.Context) (v *int, err error)
OldOwnerArtistID returns the old "owner_artist_id" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldOwnerMemberID(ctx context.Context) (v *int, err error)
OldOwnerMemberID returns the old "owner_member_id" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldPath(ctx context.Context) (v string, err error)
OldPath returns the old "path" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldPostAt(ctx context.Context) (v time.Time, err error)
OldPostAt returns the old "post_at" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldPrevPath(ctx context.Context) (v *string, err error)
OldPrevPath returns the old "prev_path" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldReblogs(ctx context.Context) (v *int, err error)
OldReblogs returns the old "reblogs" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldRecrawlRequired(ctx context.Context) (v bool, err error)
OldRecrawlRequired returns the old "recrawl_required" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldSource(ctx context.Context) (v hpameblopost.Source, err error)
OldSource returns the old "source" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldTheme(ctx context.Context) (v *string, err error)
OldTheme returns the old "theme" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
OldUpdatedAt returns the old "updated_at" field's value of the HPAmebloPost entity. If the HPAmebloPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAmebloPostMutation) Op() Op
Op returns the operation name.
func (m *HPAmebloPostMutation) OwnerArtistCleared() bool
OwnerArtistCleared reports if the "owner_artist" edge to the HPArtist entity was cleared.
func (m *HPAmebloPostMutation) OwnerArtistID() (r int, exists bool)
OwnerArtistID returns the value of the "owner_artist_id" field in the mutation.
func (m *HPAmebloPostMutation) OwnerArtistIDCleared() bool
OwnerArtistIDCleared returns if the "owner_artist_id" field was cleared in this mutation.
func (m *HPAmebloPostMutation) OwnerArtistIDs() (ids []int)
OwnerArtistIDs returns the "owner_artist" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerArtistID instead. It exists only for internal usage by the builders.
func (m *HPAmebloPostMutation) OwnerMemberCleared() bool
OwnerMemberCleared reports if the "owner_member" edge to the HPMember entity was cleared.
func (m *HPAmebloPostMutation) OwnerMemberID() (r int, exists bool)
OwnerMemberID returns the value of the "owner_member_id" field in the mutation.
func (m *HPAmebloPostMutation) OwnerMemberIDCleared() bool
OwnerMemberIDCleared returns if the "owner_member_id" field was cleared in this mutation.
func (m *HPAmebloPostMutation) OwnerMemberIDs() (ids []int)
OwnerMemberIDs returns the "owner_member" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerMemberID instead. It exists only for internal usage by the builders.
func (m *HPAmebloPostMutation) Path() (r string, exists bool)
Path returns the value of the "path" field in the mutation.
func (m *HPAmebloPostMutation) PostAt() (r time.Time, exists bool)
PostAt returns the value of the "post_at" field in the mutation.
func (m *HPAmebloPostMutation) PrevPath() (r string, exists bool)
PrevPath returns the value of the "prev_path" field in the mutation.
func (m *HPAmebloPostMutation) PrevPathCleared() bool
PrevPathCleared returns if the "prev_path" field was cleared in this mutation.
func (m *HPAmebloPostMutation) Reblogs() (r int, exists bool)
Reblogs returns the value of the "reblogs" field in the mutation.
func (m *HPAmebloPostMutation) ReblogsCleared() bool
ReblogsCleared returns if the "reblogs" field was cleared in this mutation.
func (m *HPAmebloPostMutation) RecrawlRequired() (r bool, exists bool)
RecrawlRequired returns the value of the "recrawl_required" field in the mutation.
func (m *HPAmebloPostMutation) RecrawlRequiredCleared() bool
RecrawlRequiredCleared returns if the "recrawl_required" field was cleared in this mutation.
func (m *HPAmebloPostMutation) RemoveBlobIDs(ids ...int)
RemoveBlobIDs removes the "blobs" edge to the HPBlob entity by IDs.
func (m *HPAmebloPostMutation) RemoveTaggedArtistIDs(ids ...int)
RemoveTaggedArtistIDs removes the "tagged_artists" edge to the HPArtist entity by IDs.
func (m *HPAmebloPostMutation) RemoveTaggedMemberIDs(ids ...int)
RemoveTaggedMemberIDs removes the "tagged_members" edge to the HPMember entity by IDs.
func (m *HPAmebloPostMutation) RemovedBlobsIDs() (ids []int)
RemovedBlobs returns the removed IDs of the "blobs" edge to the HPBlob entity.
func (m *HPAmebloPostMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *HPAmebloPostMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *HPAmebloPostMutation) RemovedTaggedArtistsIDs() (ids []int)
RemovedTaggedArtists returns the removed IDs of the "tagged_artists" edge to the HPArtist entity.
func (m *HPAmebloPostMutation) RemovedTaggedMembersIDs() (ids []int)
RemovedTaggedMembers returns the removed IDs of the "tagged_members" edge to the HPMember entity.
func (m *HPAmebloPostMutation) ResetArtistKey()
ResetArtistKey resets all changes to the "artist_key" field.
func (m *HPAmebloPostMutation) ResetAsset()
ResetAsset resets all changes to the "asset" edge.
func (m *HPAmebloPostMutation) ResetBlobs()
ResetBlobs resets all changes to the "blobs" edge.
func (m *HPAmebloPostMutation) ResetComments()
ResetComments resets all changes to the "comments" field.
func (m *HPAmebloPostMutation) ResetCrawledAt()
ResetCrawledAt resets all changes to the "crawled_at" field.
func (m *HPAmebloPostMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (m *HPAmebloPostMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (m *HPAmebloPostMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *HPAmebloPostMutation) ResetErrorCount()
ResetErrorCount resets all changes to the "error_count" field.
func (m *HPAmebloPostMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPAmebloPostMutation) ResetImages()
ResetImages resets all changes to the "images" field.
func (m *HPAmebloPostMutation) ResetLastErrorMessage()
ResetLastErrorMessage resets all changes to the "last_error_message" field.
func (m *HPAmebloPostMutation) ResetLikes()
ResetLikes resets all changes to the "likes" field.
func (m *HPAmebloPostMutation) ResetManuallyModified()
ResetManuallyModified resets all changes to the "manually_modified" field.
func (m *HPAmebloPostMutation) ResetMemberKey()
ResetMemberKey resets all changes to the "member_key" field.
func (m *HPAmebloPostMutation) ResetNextPath()
ResetNextPath resets all changes to the "next_path" field.
func (m *HPAmebloPostMutation) ResetOwnerArtist()
ResetOwnerArtist resets all changes to the "owner_artist" edge.
func (m *HPAmebloPostMutation) ResetOwnerArtistID()
ResetOwnerArtistID resets all changes to the "owner_artist_id" field.
func (m *HPAmebloPostMutation) ResetOwnerMember()
ResetOwnerMember resets all changes to the "owner_member" edge.
func (m *HPAmebloPostMutation) ResetOwnerMemberID()
ResetOwnerMemberID resets all changes to the "owner_member_id" field.
func (m *HPAmebloPostMutation) ResetPath()
ResetPath resets all changes to the "path" field.
func (m *HPAmebloPostMutation) ResetPostAt()
ResetPostAt resets all changes to the "post_at" field.
func (m *HPAmebloPostMutation) ResetPrevPath()
ResetPrevPath resets all changes to the "prev_path" field.
func (m *HPAmebloPostMutation) ResetReblogs()
ResetReblogs resets all changes to the "reblogs" field.
func (m *HPAmebloPostMutation) ResetRecrawlRequired()
ResetRecrawlRequired resets all changes to the "recrawl_required" field.
func (m *HPAmebloPostMutation) ResetSource()
ResetSource resets all changes to the "source" field.
func (m *HPAmebloPostMutation) ResetTaggedArtists()
ResetTaggedArtists resets all changes to the "tagged_artists" edge.
func (m *HPAmebloPostMutation) ResetTaggedMembers()
ResetTaggedMembers resets all changes to the "tagged_members" edge.
func (m *HPAmebloPostMutation) ResetTheme()
ResetTheme resets all changes to the "theme" field.
func (m *HPAmebloPostMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (m *HPAmebloPostMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (m *HPAmebloPostMutation) SetArtistKey(s string)
SetArtistKey sets the "artist_key" field.
func (m *HPAmebloPostMutation) SetAssetID(id int)
SetAssetID sets the "asset" edge to the HPAsset entity by id.
func (m *HPAmebloPostMutation) SetComments(i int)
SetComments sets the "comments" field.
func (m *HPAmebloPostMutation) SetCrawledAt(t time.Time)
SetCrawledAt sets the "crawled_at" field.
func (m *HPAmebloPostMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (m *HPAmebloPostMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (m *HPAmebloPostMutation) SetErrorCount(i int)
SetErrorCount sets the "error_count" field.
func (m *HPAmebloPostMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPAmebloPostMutation) SetImages(j []jsonfields.Media)
SetImages sets the "images" field.
func (m *HPAmebloPostMutation) SetLastErrorMessage(s string)
SetLastErrorMessage sets the "last_error_message" field.
func (m *HPAmebloPostMutation) SetLikes(i int)
SetLikes sets the "likes" field.
func (m *HPAmebloPostMutation) SetManuallyModified(jm *jsonfields.ManuallyModified)
SetManuallyModified sets the "manually_modified" field.
func (m *HPAmebloPostMutation) SetMemberKey(s string)
SetMemberKey sets the "member_key" field.
func (m *HPAmebloPostMutation) SetNextPath(s string)
SetNextPath sets the "next_path" field.
func (m *HPAmebloPostMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *HPAmebloPostMutation) SetOwnerArtistID(i int)
SetOwnerArtistID sets the "owner_artist_id" field.
func (m *HPAmebloPostMutation) SetOwnerMemberID(i int)
SetOwnerMemberID sets the "owner_member_id" field.
func (m *HPAmebloPostMutation) SetPath(s string)
SetPath sets the "path" field.
func (m *HPAmebloPostMutation) SetPostAt(t time.Time)
SetPostAt sets the "post_at" field.
func (m *HPAmebloPostMutation) SetPrevPath(s string)
SetPrevPath sets the "prev_path" field.
func (m *HPAmebloPostMutation) SetReblogs(i int)
SetReblogs sets the "reblogs" field.
func (m *HPAmebloPostMutation) SetRecrawlRequired(b bool)
SetRecrawlRequired sets the "recrawl_required" field.
func (m *HPAmebloPostMutation) SetSource(h hpameblopost.Source)
SetSource sets the "source" field.
func (m *HPAmebloPostMutation) SetTheme(s string)
SetTheme sets the "theme" field.
func (m *HPAmebloPostMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (m *HPAmebloPostMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (m *HPAmebloPostMutation) Source() (r hpameblopost.Source, exists bool)
Source returns the value of the "source" field in the mutation.
func (m *HPAmebloPostMutation) TaggedArtistsCleared() bool
TaggedArtistsCleared reports if the "tagged_artists" edge to the HPArtist entity was cleared.
func (m *HPAmebloPostMutation) TaggedArtistsIDs() (ids []int)
TaggedArtistsIDs returns the "tagged_artists" edge IDs in the mutation.
func (m *HPAmebloPostMutation) TaggedMembersCleared() bool
TaggedMembersCleared reports if the "tagged_members" edge to the HPMember entity was cleared.
func (m *HPAmebloPostMutation) TaggedMembersIDs() (ids []int)
TaggedMembersIDs returns the "tagged_members" edge IDs in the mutation.
func (m *HPAmebloPostMutation) Theme() (r string, exists bool)
Theme returns the value of the "theme" field in the mutation.
func (m *HPAmebloPostMutation) ThemeCleared() bool
ThemeCleared returns if the "theme" field was cleared in this mutation.
func (m *HPAmebloPostMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (m HPAmebloPostMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *HPAmebloPostMutation) Type() string
Type returns the node type of this mutation (HPAmebloPost).
func (m *HPAmebloPostMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (m *HPAmebloPostMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (m *HPAmebloPostMutation) Where(ps ...predicate.HPAmebloPost)
Where appends a list predicates to the HPAmebloPostMutation builder.
func (m *HPAmebloPostMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HPAmebloPostMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
HPAmebloPostOrder defines the ordering of HPAmebloPost.
type HPAmebloPostOrder struct {
Direction OrderDirection `json:"direction"`
Field *HPAmebloPostOrderField `json:"field"`
}
HPAmebloPostOrderField defines the ordering field of HPAmebloPost.
type HPAmebloPostOrderField struct {
// contains filtered or unexported fields
}
HPAmebloPostPaginateOption enables pagination customization.
type HPAmebloPostPaginateOption func(*hpameblopostPager) error
func WithHPAmebloPostFilter(filter func(*HPAmebloPostQuery) (*HPAmebloPostQuery, error)) HPAmebloPostPaginateOption
WithHPAmebloPostFilter configures pagination filter.
func WithHPAmebloPostOrder(order *HPAmebloPostOrder) HPAmebloPostPaginateOption
WithHPAmebloPostOrder configures pagination ordering.
HPAmebloPostQuery is the builder for querying HPAmebloPost entities.
type HPAmebloPostQuery struct {
// contains filtered or unexported fields
}
func (hapq *HPAmebloPostQuery) Aggregate(fns ...AggregateFunc) *HPAmebloPostSelect
Aggregate returns a HPAmebloPostSelect configured with the given aggregations.
func (hapq *HPAmebloPostQuery) All(ctx context.Context) ([]*HPAmebloPost, error)
All executes the query and returns a list of HPAmebloPosts.
func (hapq *HPAmebloPostQuery) AllX(ctx context.Context) []*HPAmebloPost
AllX is like All, but panics if an error occurs.
func (hapq *HPAmebloPostQuery) Clone() *HPAmebloPostQuery
Clone returns a duplicate of the HPAmebloPostQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (hap *HPAmebloPostQuery) CollectFields(ctx context.Context, satisfies ...string) (*HPAmebloPostQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (hapq *HPAmebloPostQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (hapq *HPAmebloPostQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (hapq *HPAmebloPostQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (hapq *HPAmebloPostQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (hapq *HPAmebloPostQuery) Filter() *HPAmebloPostFilter
Filter returns a Filter implementation to apply filters on the HPAmebloPostQuery builder.
func (hapq *HPAmebloPostQuery) First(ctx context.Context) (*HPAmebloPost, error)
First returns the first HPAmebloPost entity from the query. Returns a *NotFoundError when no HPAmebloPost was found.
func (hapq *HPAmebloPostQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first HPAmebloPost ID from the query. Returns a *NotFoundError when no HPAmebloPost ID was found.
func (hapq *HPAmebloPostQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (hapq *HPAmebloPostQuery) FirstX(ctx context.Context) *HPAmebloPost
FirstX is like First, but panics if an error occurs.
func (hapq *HPAmebloPostQuery) GroupBy(field string, fields ...string) *HPAmebloPostGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CrawledAt time.Time `json:"crawled_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.HPAmebloPost.Query().
GroupBy(hpameblopost.FieldCrawledAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (hapq *HPAmebloPostQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of HPAmebloPost IDs.
func (hapq *HPAmebloPostQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (hapq *HPAmebloPostQuery) Limit(limit int) *HPAmebloPostQuery
Limit the number of records to be returned by this query.
func (hapq *HPAmebloPostQuery) Offset(offset int) *HPAmebloPostQuery
Offset to start from.
func (hapq *HPAmebloPostQuery) Only(ctx context.Context) (*HPAmebloPost, error)
Only returns a single HPAmebloPost entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HPAmebloPost entity is found. Returns a *NotFoundError when no HPAmebloPost entities are found.
func (hapq *HPAmebloPostQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only HPAmebloPost ID in the query. Returns a *NotSingularError when more than one HPAmebloPost ID is found. Returns a *NotFoundError when no entities are found.
func (hapq *HPAmebloPostQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (hapq *HPAmebloPostQuery) OnlyX(ctx context.Context) *HPAmebloPost
OnlyX is like Only, but panics if an error occurs.
func (hapq *HPAmebloPostQuery) Order(o ...hpameblopost.Order) *HPAmebloPostQuery
Order specifies how the records should be ordered.
func (hap *HPAmebloPostQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...HPAmebloPostPaginateOption, ) (*HPAmebloPostConnection, error)
Paginate executes the query and returns a relay based cursor connection to HPAmebloPost.
func (hapq *HPAmebloPostQuery) QueryAsset() *HPAssetQuery
QueryAsset chains the current query on the "asset" edge.
func (hapq *HPAmebloPostQuery) QueryBlobs() *HPBlobQuery
QueryBlobs chains the current query on the "blobs" edge.
func (hapq *HPAmebloPostQuery) QueryOwnerArtist() *HPArtistQuery
QueryOwnerArtist chains the current query on the "owner_artist" edge.
func (hapq *HPAmebloPostQuery) QueryOwnerMember() *HPMemberQuery
QueryOwnerMember chains the current query on the "owner_member" edge.
func (hapq *HPAmebloPostQuery) QueryTaggedArtists() *HPArtistQuery
QueryTaggedArtists chains the current query on the "tagged_artists" edge.
func (hapq *HPAmebloPostQuery) QueryTaggedMembers() *HPMemberQuery
QueryTaggedMembers chains the current query on the "tagged_members" edge.
func (hapq *HPAmebloPostQuery) Select(fields ...string) *HPAmebloPostSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CrawledAt time.Time `json:"crawled_at,omitempty"`
}
client.HPAmebloPost.Query().
Select(hpameblopost.FieldCrawledAt).
Scan(ctx, &v)
func (hapq *HPAmebloPostQuery) Unique(unique bool) *HPAmebloPostQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (hapq *HPAmebloPostQuery) Where(ps ...predicate.HPAmebloPost) *HPAmebloPostQuery
Where adds a new predicate for the HPAmebloPostQuery builder.
func (hapq *HPAmebloPostQuery) WithAsset(opts ...func(*HPAssetQuery)) *HPAmebloPostQuery
WithAsset tells the query-builder to eager-load the nodes that are connected to the "asset" edge. The optional arguments are used to configure the query builder of the edge.
func (hapq *HPAmebloPostQuery) WithBlobs(opts ...func(*HPBlobQuery)) *HPAmebloPostQuery
WithBlobs tells the query-builder to eager-load the nodes that are connected to the "blobs" edge. The optional arguments are used to configure the query builder of the edge.
func (hapq *HPAmebloPostQuery) WithNamedBlobs(name string, opts ...func(*HPBlobQuery)) *HPAmebloPostQuery
WithNamedBlobs tells the query-builder to eager-load the nodes that are connected to the "blobs" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hapq *HPAmebloPostQuery) WithNamedTaggedArtists(name string, opts ...func(*HPArtistQuery)) *HPAmebloPostQuery
WithNamedTaggedArtists tells the query-builder to eager-load the nodes that are connected to the "tagged_artists" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hapq *HPAmebloPostQuery) WithNamedTaggedMembers(name string, opts ...func(*HPMemberQuery)) *HPAmebloPostQuery
WithNamedTaggedMembers tells the query-builder to eager-load the nodes that are connected to the "tagged_members" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hapq *HPAmebloPostQuery) WithOwnerArtist(opts ...func(*HPArtistQuery)) *HPAmebloPostQuery
WithOwnerArtist tells the query-builder to eager-load the nodes that are connected to the "owner_artist" edge. The optional arguments are used to configure the query builder of the edge.
func (hapq *HPAmebloPostQuery) WithOwnerMember(opts ...func(*HPMemberQuery)) *HPAmebloPostQuery
WithOwnerMember tells the query-builder to eager-load the nodes that are connected to the "owner_member" edge. The optional arguments are used to configure the query builder of the edge.
func (hapq *HPAmebloPostQuery) WithTaggedArtists(opts ...func(*HPArtistQuery)) *HPAmebloPostQuery
WithTaggedArtists tells the query-builder to eager-load the nodes that are connected to the "tagged_artists" edge. The optional arguments are used to configure the query builder of the edge.
func (hapq *HPAmebloPostQuery) WithTaggedMembers(opts ...func(*HPMemberQuery)) *HPAmebloPostQuery
WithTaggedMembers tells the query-builder to eager-load the nodes that are connected to the "tagged_members" edge. The optional arguments are used to configure the query builder of the edge.
HPAmebloPostSelect is the builder for selecting fields of HPAmebloPost entities.
type HPAmebloPostSelect struct {
*HPAmebloPostQuery
// contains filtered or unexported fields
}
func (haps *HPAmebloPostSelect) Aggregate(fns ...AggregateFunc) *HPAmebloPostSelect
Aggregate adds the given aggregation functions to the selector query.
func (s *HPAmebloPostSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPAmebloPostSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPAmebloPostSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPAmebloPostSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPAmebloPostSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPAmebloPostSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPAmebloPostSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPAmebloPostSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPAmebloPostSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPAmebloPostSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPAmebloPostSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPAmebloPostSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (haps *HPAmebloPostSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPAmebloPostSelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPAmebloPostSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPAmebloPostSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPAmebloPostSelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPAmebloPostSelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPAmebloPostUpdate is the builder for updating HPAmebloPost entities.
type HPAmebloPostUpdate struct {
// contains filtered or unexported fields
}
func (hapu *HPAmebloPostUpdate) AddBlobIDs(ids ...int) *HPAmebloPostUpdate
AddBlobIDs adds the "blobs" edge to the HPBlob entity by IDs.
func (hapu *HPAmebloPostUpdate) AddBlobs(h ...*HPBlob) *HPAmebloPostUpdate
AddBlobs adds the "blobs" edges to the HPBlob entity.
func (hapu *HPAmebloPostUpdate) AddComments(i int) *HPAmebloPostUpdate
AddComments adds i to the "comments" field.
func (hapu *HPAmebloPostUpdate) AddErrorCount(i int) *HPAmebloPostUpdate
AddErrorCount adds i to the "error_count" field.
func (hapu *HPAmebloPostUpdate) AddLikes(i int) *HPAmebloPostUpdate
AddLikes adds i to the "likes" field.
func (hapu *HPAmebloPostUpdate) AddReblogs(i int) *HPAmebloPostUpdate
AddReblogs adds i to the "reblogs" field.
func (hapu *HPAmebloPostUpdate) AddTaggedArtistIDs(ids ...int) *HPAmebloPostUpdate
AddTaggedArtistIDs adds the "tagged_artists" edge to the HPArtist entity by IDs.
func (hapu *HPAmebloPostUpdate) AddTaggedArtists(h ...*HPArtist) *HPAmebloPostUpdate
AddTaggedArtists adds the "tagged_artists" edges to the HPArtist entity.
func (hapu *HPAmebloPostUpdate) AddTaggedMemberIDs(ids ...int) *HPAmebloPostUpdate
AddTaggedMemberIDs adds the "tagged_members" edge to the HPMember entity by IDs.
func (hapu *HPAmebloPostUpdate) AddTaggedMembers(h ...*HPMember) *HPAmebloPostUpdate
AddTaggedMembers adds the "tagged_members" edges to the HPMember entity.
func (hapu *HPAmebloPostUpdate) AppendImages(j []jsonfields.Media) *HPAmebloPostUpdate
AppendImages appends j to the "images" field.
func (hapu *HPAmebloPostUpdate) ClearAsset() *HPAmebloPostUpdate
ClearAsset clears the "asset" edge to the HPAsset entity.
func (hapu *HPAmebloPostUpdate) ClearBlobs() *HPAmebloPostUpdate
ClearBlobs clears all "blobs" edges to the HPBlob entity.
func (hapu *HPAmebloPostUpdate) ClearComments() *HPAmebloPostUpdate
ClearComments clears the value of the "comments" field.
func (hapu *HPAmebloPostUpdate) ClearCrawledAt() *HPAmebloPostUpdate
ClearCrawledAt clears the value of the "crawled_at" field.
func (hapu *HPAmebloPostUpdate) ClearImages() *HPAmebloPostUpdate
ClearImages clears the value of the "images" field.
func (hapu *HPAmebloPostUpdate) ClearLastErrorMessage() *HPAmebloPostUpdate
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (hapu *HPAmebloPostUpdate) ClearLikes() *HPAmebloPostUpdate
ClearLikes clears the value of the "likes" field.
func (hapu *HPAmebloPostUpdate) ClearManuallyModified() *HPAmebloPostUpdate
ClearManuallyModified clears the value of the "manually_modified" field.
func (hapu *HPAmebloPostUpdate) ClearMemberKey() *HPAmebloPostUpdate
ClearMemberKey clears the value of the "member_key" field.
func (hapu *HPAmebloPostUpdate) ClearNextPath() *HPAmebloPostUpdate
ClearNextPath clears the value of the "next_path" field.
func (hapu *HPAmebloPostUpdate) ClearOwnerArtist() *HPAmebloPostUpdate
ClearOwnerArtist clears the "owner_artist" edge to the HPArtist entity.
func (hapu *HPAmebloPostUpdate) ClearOwnerArtistID() *HPAmebloPostUpdate
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (hapu *HPAmebloPostUpdate) ClearOwnerMember() *HPAmebloPostUpdate
ClearOwnerMember clears the "owner_member" edge to the HPMember entity.
func (hapu *HPAmebloPostUpdate) ClearOwnerMemberID() *HPAmebloPostUpdate
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (hapu *HPAmebloPostUpdate) ClearPrevPath() *HPAmebloPostUpdate
ClearPrevPath clears the value of the "prev_path" field.
func (hapu *HPAmebloPostUpdate) ClearReblogs() *HPAmebloPostUpdate
ClearReblogs clears the value of the "reblogs" field.
func (hapu *HPAmebloPostUpdate) ClearRecrawlRequired() *HPAmebloPostUpdate
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (hapu *HPAmebloPostUpdate) ClearTaggedArtists() *HPAmebloPostUpdate
ClearTaggedArtists clears all "tagged_artists" edges to the HPArtist entity.
func (hapu *HPAmebloPostUpdate) ClearTaggedMembers() *HPAmebloPostUpdate
ClearTaggedMembers clears all "tagged_members" edges to the HPMember entity.
func (hapu *HPAmebloPostUpdate) ClearTheme() *HPAmebloPostUpdate
ClearTheme clears the value of the "theme" field.
func (hapu *HPAmebloPostUpdate) ClearUpdatedAt() *HPAmebloPostUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (hapu *HPAmebloPostUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (hapu *HPAmebloPostUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hapu *HPAmebloPostUpdate) Mutation() *HPAmebloPostMutation
Mutation returns the HPAmebloPostMutation object of the builder.
func (hapu *HPAmebloPostUpdate) RemoveBlobIDs(ids ...int) *HPAmebloPostUpdate
RemoveBlobIDs removes the "blobs" edge to HPBlob entities by IDs.
func (hapu *HPAmebloPostUpdate) RemoveBlobs(h ...*HPBlob) *HPAmebloPostUpdate
RemoveBlobs removes "blobs" edges to HPBlob entities.
func (hapu *HPAmebloPostUpdate) RemoveTaggedArtistIDs(ids ...int) *HPAmebloPostUpdate
RemoveTaggedArtistIDs removes the "tagged_artists" edge to HPArtist entities by IDs.
func (hapu *HPAmebloPostUpdate) RemoveTaggedArtists(h ...*HPArtist) *HPAmebloPostUpdate
RemoveTaggedArtists removes "tagged_artists" edges to HPArtist entities.
func (hapu *HPAmebloPostUpdate) RemoveTaggedMemberIDs(ids ...int) *HPAmebloPostUpdate
RemoveTaggedMemberIDs removes the "tagged_members" edge to HPMember entities by IDs.
func (hapu *HPAmebloPostUpdate) RemoveTaggedMembers(h ...*HPMember) *HPAmebloPostUpdate
RemoveTaggedMembers removes "tagged_members" edges to HPMember entities.
func (hapu *HPAmebloPostUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (hapu *HPAmebloPostUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (hapu *HPAmebloPostUpdate) SetArtistKey(s string) *HPAmebloPostUpdate
SetArtistKey sets the "artist_key" field.
func (hapu *HPAmebloPostUpdate) SetAsset(h *HPAsset) *HPAmebloPostUpdate
SetAsset sets the "asset" edge to the HPAsset entity.
func (hapu *HPAmebloPostUpdate) SetAssetID(id int) *HPAmebloPostUpdate
SetAssetID sets the "asset" edge to the HPAsset entity by ID.
func (hapu *HPAmebloPostUpdate) SetComments(i int) *HPAmebloPostUpdate
SetComments sets the "comments" field.
func (hapu *HPAmebloPostUpdate) SetCrawledAt(t time.Time) *HPAmebloPostUpdate
SetCrawledAt sets the "crawled_at" field.
func (hapu *HPAmebloPostUpdate) SetDescription(s string) *HPAmebloPostUpdate
SetDescription sets the "description" field.
func (hapu *HPAmebloPostUpdate) SetErrorCount(i int) *HPAmebloPostUpdate
SetErrorCount sets the "error_count" field.
func (hapu *HPAmebloPostUpdate) SetImages(j []jsonfields.Media) *HPAmebloPostUpdate
SetImages sets the "images" field.
func (hapu *HPAmebloPostUpdate) SetLastErrorMessage(s string) *HPAmebloPostUpdate
SetLastErrorMessage sets the "last_error_message" field.
func (hapu *HPAmebloPostUpdate) SetLikes(i int) *HPAmebloPostUpdate
SetLikes sets the "likes" field.
func (hapu *HPAmebloPostUpdate) SetManuallyModified(jm *jsonfields.ManuallyModified) *HPAmebloPostUpdate
SetManuallyModified sets the "manually_modified" field.
func (hapu *HPAmebloPostUpdate) SetMemberKey(s string) *HPAmebloPostUpdate
SetMemberKey sets the "member_key" field.
func (hapu *HPAmebloPostUpdate) SetNextPath(s string) *HPAmebloPostUpdate
SetNextPath sets the "next_path" field.
func (hapu *HPAmebloPostUpdate) SetNillableAssetID(id *int) *HPAmebloPostUpdate
SetNillableAssetID sets the "asset" edge to the HPAsset entity by ID if the given value is not nil.
func (hapu *HPAmebloPostUpdate) SetNillableComments(i *int) *HPAmebloPostUpdate
SetNillableComments sets the "comments" field if the given value is not nil.
func (hapu *HPAmebloPostUpdate) SetNillableCrawledAt(t *time.Time) *HPAmebloPostUpdate
SetNillableCrawledAt sets the "crawled_at" field if the given value is not nil.
func (hapu *HPAmebloPostUpdate) SetNillableErrorCount(i *int) *HPAmebloPostUpdate
SetNillableErrorCount sets the "error_count" field if the given value is not nil.
func (hapu *HPAmebloPostUpdate) SetNillableLastErrorMessage(s *string) *HPAmebloPostUpdate
SetNillableLastErrorMessage sets the "last_error_message" field if the given value is not nil.
func (hapu *HPAmebloPostUpdate) SetNillableLikes(i *int) *HPAmebloPostUpdate
SetNillableLikes sets the "likes" field if the given value is not nil.
func (hapu *HPAmebloPostUpdate) SetNillableMemberKey(s *string) *HPAmebloPostUpdate
SetNillableMemberKey sets the "member_key" field if the given value is not nil.
func (hapu *HPAmebloPostUpdate) SetNillableNextPath(s *string) *HPAmebloPostUpdate
SetNillableNextPath sets the "next_path" field if the given value is not nil.
func (hapu *HPAmebloPostUpdate) SetNillableOwnerArtistID(i *int) *HPAmebloPostUpdate
SetNillableOwnerArtistID sets the "owner_artist_id" field if the given value is not nil.
func (hapu *HPAmebloPostUpdate) SetNillableOwnerMemberID(i *int) *HPAmebloPostUpdate
SetNillableOwnerMemberID sets the "owner_member_id" field if the given value is not nil.
func (hapu *HPAmebloPostUpdate) SetNillablePrevPath(s *string) *HPAmebloPostUpdate
SetNillablePrevPath sets the "prev_path" field if the given value is not nil.
func (hapu *HPAmebloPostUpdate) SetNillableReblogs(i *int) *HPAmebloPostUpdate
SetNillableReblogs sets the "reblogs" field if the given value is not nil.
func (hapu *HPAmebloPostUpdate) SetNillableRecrawlRequired(b *bool) *HPAmebloPostUpdate
SetNillableRecrawlRequired sets the "recrawl_required" field if the given value is not nil.
func (hapu *HPAmebloPostUpdate) SetNillableTheme(s *string) *HPAmebloPostUpdate
SetNillableTheme sets the "theme" field if the given value is not nil.
func (hapu *HPAmebloPostUpdate) SetNillableUpdatedAt(t *time.Time) *HPAmebloPostUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hapu *HPAmebloPostUpdate) SetOwnerArtist(h *HPArtist) *HPAmebloPostUpdate
SetOwnerArtist sets the "owner_artist" edge to the HPArtist entity.
func (hapu *HPAmebloPostUpdate) SetOwnerArtistID(i int) *HPAmebloPostUpdate
SetOwnerArtistID sets the "owner_artist_id" field.
func (hapu *HPAmebloPostUpdate) SetOwnerMember(h *HPMember) *HPAmebloPostUpdate
SetOwnerMember sets the "owner_member" edge to the HPMember entity.
func (hapu *HPAmebloPostUpdate) SetOwnerMemberID(i int) *HPAmebloPostUpdate
SetOwnerMemberID sets the "owner_member_id" field.
func (hapu *HPAmebloPostUpdate) SetPath(s string) *HPAmebloPostUpdate
SetPath sets the "path" field.
func (hapu *HPAmebloPostUpdate) SetPostAt(t time.Time) *HPAmebloPostUpdate
SetPostAt sets the "post_at" field.
func (hapu *HPAmebloPostUpdate) SetPrevPath(s string) *HPAmebloPostUpdate
SetPrevPath sets the "prev_path" field.
func (hapu *HPAmebloPostUpdate) SetReblogs(i int) *HPAmebloPostUpdate
SetReblogs sets the "reblogs" field.
func (hapu *HPAmebloPostUpdate) SetRecrawlRequired(b bool) *HPAmebloPostUpdate
SetRecrawlRequired sets the "recrawl_required" field.
func (hapu *HPAmebloPostUpdate) SetSource(h hpameblopost.Source) *HPAmebloPostUpdate
SetSource sets the "source" field.
func (hapu *HPAmebloPostUpdate) SetTheme(s string) *HPAmebloPostUpdate
SetTheme sets the "theme" field.
func (hapu *HPAmebloPostUpdate) SetTitle(s string) *HPAmebloPostUpdate
SetTitle sets the "title" field.
func (hapu *HPAmebloPostUpdate) SetUpdatedAt(t time.Time) *HPAmebloPostUpdate
SetUpdatedAt sets the "updated_at" field.
func (hapu *HPAmebloPostUpdate) Where(ps ...predicate.HPAmebloPost) *HPAmebloPostUpdate
Where appends a list predicates to the HPAmebloPostUpdate builder.
HPAmebloPostUpdateOne is the builder for updating a single HPAmebloPost entity.
type HPAmebloPostUpdateOne struct {
// contains filtered or unexported fields
}
func (hapuo *HPAmebloPostUpdateOne) AddBlobIDs(ids ...int) *HPAmebloPostUpdateOne
AddBlobIDs adds the "blobs" edge to the HPBlob entity by IDs.
func (hapuo *HPAmebloPostUpdateOne) AddBlobs(h ...*HPBlob) *HPAmebloPostUpdateOne
AddBlobs adds the "blobs" edges to the HPBlob entity.
func (hapuo *HPAmebloPostUpdateOne) AddComments(i int) *HPAmebloPostUpdateOne
AddComments adds i to the "comments" field.
func (hapuo *HPAmebloPostUpdateOne) AddErrorCount(i int) *HPAmebloPostUpdateOne
AddErrorCount adds i to the "error_count" field.
func (hapuo *HPAmebloPostUpdateOne) AddLikes(i int) *HPAmebloPostUpdateOne
AddLikes adds i to the "likes" field.
func (hapuo *HPAmebloPostUpdateOne) AddReblogs(i int) *HPAmebloPostUpdateOne
AddReblogs adds i to the "reblogs" field.
func (hapuo *HPAmebloPostUpdateOne) AddTaggedArtistIDs(ids ...int) *HPAmebloPostUpdateOne
AddTaggedArtistIDs adds the "tagged_artists" edge to the HPArtist entity by IDs.
func (hapuo *HPAmebloPostUpdateOne) AddTaggedArtists(h ...*HPArtist) *HPAmebloPostUpdateOne
AddTaggedArtists adds the "tagged_artists" edges to the HPArtist entity.
func (hapuo *HPAmebloPostUpdateOne) AddTaggedMemberIDs(ids ...int) *HPAmebloPostUpdateOne
AddTaggedMemberIDs adds the "tagged_members" edge to the HPMember entity by IDs.
func (hapuo *HPAmebloPostUpdateOne) AddTaggedMembers(h ...*HPMember) *HPAmebloPostUpdateOne
AddTaggedMembers adds the "tagged_members" edges to the HPMember entity.
func (hapuo *HPAmebloPostUpdateOne) AppendImages(j []jsonfields.Media) *HPAmebloPostUpdateOne
AppendImages appends j to the "images" field.
func (hapuo *HPAmebloPostUpdateOne) ClearAsset() *HPAmebloPostUpdateOne
ClearAsset clears the "asset" edge to the HPAsset entity.
func (hapuo *HPAmebloPostUpdateOne) ClearBlobs() *HPAmebloPostUpdateOne
ClearBlobs clears all "blobs" edges to the HPBlob entity.
func (hapuo *HPAmebloPostUpdateOne) ClearComments() *HPAmebloPostUpdateOne
ClearComments clears the value of the "comments" field.
func (hapuo *HPAmebloPostUpdateOne) ClearCrawledAt() *HPAmebloPostUpdateOne
ClearCrawledAt clears the value of the "crawled_at" field.
func (hapuo *HPAmebloPostUpdateOne) ClearImages() *HPAmebloPostUpdateOne
ClearImages clears the value of the "images" field.
func (hapuo *HPAmebloPostUpdateOne) ClearLastErrorMessage() *HPAmebloPostUpdateOne
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (hapuo *HPAmebloPostUpdateOne) ClearLikes() *HPAmebloPostUpdateOne
ClearLikes clears the value of the "likes" field.
func (hapuo *HPAmebloPostUpdateOne) ClearManuallyModified() *HPAmebloPostUpdateOne
ClearManuallyModified clears the value of the "manually_modified" field.
func (hapuo *HPAmebloPostUpdateOne) ClearMemberKey() *HPAmebloPostUpdateOne
ClearMemberKey clears the value of the "member_key" field.
func (hapuo *HPAmebloPostUpdateOne) ClearNextPath() *HPAmebloPostUpdateOne
ClearNextPath clears the value of the "next_path" field.
func (hapuo *HPAmebloPostUpdateOne) ClearOwnerArtist() *HPAmebloPostUpdateOne
ClearOwnerArtist clears the "owner_artist" edge to the HPArtist entity.
func (hapuo *HPAmebloPostUpdateOne) ClearOwnerArtistID() *HPAmebloPostUpdateOne
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (hapuo *HPAmebloPostUpdateOne) ClearOwnerMember() *HPAmebloPostUpdateOne
ClearOwnerMember clears the "owner_member" edge to the HPMember entity.
func (hapuo *HPAmebloPostUpdateOne) ClearOwnerMemberID() *HPAmebloPostUpdateOne
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (hapuo *HPAmebloPostUpdateOne) ClearPrevPath() *HPAmebloPostUpdateOne
ClearPrevPath clears the value of the "prev_path" field.
func (hapuo *HPAmebloPostUpdateOne) ClearReblogs() *HPAmebloPostUpdateOne
ClearReblogs clears the value of the "reblogs" field.
func (hapuo *HPAmebloPostUpdateOne) ClearRecrawlRequired() *HPAmebloPostUpdateOne
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (hapuo *HPAmebloPostUpdateOne) ClearTaggedArtists() *HPAmebloPostUpdateOne
ClearTaggedArtists clears all "tagged_artists" edges to the HPArtist entity.
func (hapuo *HPAmebloPostUpdateOne) ClearTaggedMembers() *HPAmebloPostUpdateOne
ClearTaggedMembers clears all "tagged_members" edges to the HPMember entity.
func (hapuo *HPAmebloPostUpdateOne) ClearTheme() *HPAmebloPostUpdateOne
ClearTheme clears the value of the "theme" field.
func (hapuo *HPAmebloPostUpdateOne) ClearUpdatedAt() *HPAmebloPostUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (hapuo *HPAmebloPostUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (hapuo *HPAmebloPostUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hapuo *HPAmebloPostUpdateOne) Mutation() *HPAmebloPostMutation
Mutation returns the HPAmebloPostMutation object of the builder.
func (hapuo *HPAmebloPostUpdateOne) RemoveBlobIDs(ids ...int) *HPAmebloPostUpdateOne
RemoveBlobIDs removes the "blobs" edge to HPBlob entities by IDs.
func (hapuo *HPAmebloPostUpdateOne) RemoveBlobs(h ...*HPBlob) *HPAmebloPostUpdateOne
RemoveBlobs removes "blobs" edges to HPBlob entities.
func (hapuo *HPAmebloPostUpdateOne) RemoveTaggedArtistIDs(ids ...int) *HPAmebloPostUpdateOne
RemoveTaggedArtistIDs removes the "tagged_artists" edge to HPArtist entities by IDs.
func (hapuo *HPAmebloPostUpdateOne) RemoveTaggedArtists(h ...*HPArtist) *HPAmebloPostUpdateOne
RemoveTaggedArtists removes "tagged_artists" edges to HPArtist entities.
func (hapuo *HPAmebloPostUpdateOne) RemoveTaggedMemberIDs(ids ...int) *HPAmebloPostUpdateOne
RemoveTaggedMemberIDs removes the "tagged_members" edge to HPMember entities by IDs.
func (hapuo *HPAmebloPostUpdateOne) RemoveTaggedMembers(h ...*HPMember) *HPAmebloPostUpdateOne
RemoveTaggedMembers removes "tagged_members" edges to HPMember entities.
func (hapuo *HPAmebloPostUpdateOne) Save(ctx context.Context) (*HPAmebloPost, error)
Save executes the query and returns the updated HPAmebloPost entity.
func (hapuo *HPAmebloPostUpdateOne) SaveX(ctx context.Context) *HPAmebloPost
SaveX is like Save, but panics if an error occurs.
func (hapuo *HPAmebloPostUpdateOne) Select(field string, fields ...string) *HPAmebloPostUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (hapuo *HPAmebloPostUpdateOne) SetArtistKey(s string) *HPAmebloPostUpdateOne
SetArtistKey sets the "artist_key" field.
func (hapuo *HPAmebloPostUpdateOne) SetAsset(h *HPAsset) *HPAmebloPostUpdateOne
SetAsset sets the "asset" edge to the HPAsset entity.
func (hapuo *HPAmebloPostUpdateOne) SetAssetID(id int) *HPAmebloPostUpdateOne
SetAssetID sets the "asset" edge to the HPAsset entity by ID.
func (hapuo *HPAmebloPostUpdateOne) SetComments(i int) *HPAmebloPostUpdateOne
SetComments sets the "comments" field.
func (hapuo *HPAmebloPostUpdateOne) SetCrawledAt(t time.Time) *HPAmebloPostUpdateOne
SetCrawledAt sets the "crawled_at" field.
func (hapuo *HPAmebloPostUpdateOne) SetDescription(s string) *HPAmebloPostUpdateOne
SetDescription sets the "description" field.
func (hapuo *HPAmebloPostUpdateOne) SetErrorCount(i int) *HPAmebloPostUpdateOne
SetErrorCount sets the "error_count" field.
func (hapuo *HPAmebloPostUpdateOne) SetImages(j []jsonfields.Media) *HPAmebloPostUpdateOne
SetImages sets the "images" field.
func (hapuo *HPAmebloPostUpdateOne) SetLastErrorMessage(s string) *HPAmebloPostUpdateOne
SetLastErrorMessage sets the "last_error_message" field.
func (hapuo *HPAmebloPostUpdateOne) SetLikes(i int) *HPAmebloPostUpdateOne
SetLikes sets the "likes" field.
func (hapuo *HPAmebloPostUpdateOne) SetManuallyModified(jm *jsonfields.ManuallyModified) *HPAmebloPostUpdateOne
SetManuallyModified sets the "manually_modified" field.
func (hapuo *HPAmebloPostUpdateOne) SetMemberKey(s string) *HPAmebloPostUpdateOne
SetMemberKey sets the "member_key" field.
func (hapuo *HPAmebloPostUpdateOne) SetNextPath(s string) *HPAmebloPostUpdateOne
SetNextPath sets the "next_path" field.
func (hapuo *HPAmebloPostUpdateOne) SetNillableAssetID(id *int) *HPAmebloPostUpdateOne
SetNillableAssetID sets the "asset" edge to the HPAsset entity by ID if the given value is not nil.
func (hapuo *HPAmebloPostUpdateOne) SetNillableComments(i *int) *HPAmebloPostUpdateOne
SetNillableComments sets the "comments" field if the given value is not nil.
func (hapuo *HPAmebloPostUpdateOne) SetNillableCrawledAt(t *time.Time) *HPAmebloPostUpdateOne
SetNillableCrawledAt sets the "crawled_at" field if the given value is not nil.
func (hapuo *HPAmebloPostUpdateOne) SetNillableErrorCount(i *int) *HPAmebloPostUpdateOne
SetNillableErrorCount sets the "error_count" field if the given value is not nil.
func (hapuo *HPAmebloPostUpdateOne) SetNillableLastErrorMessage(s *string) *HPAmebloPostUpdateOne
SetNillableLastErrorMessage sets the "last_error_message" field if the given value is not nil.
func (hapuo *HPAmebloPostUpdateOne) SetNillableLikes(i *int) *HPAmebloPostUpdateOne
SetNillableLikes sets the "likes" field if the given value is not nil.
func (hapuo *HPAmebloPostUpdateOne) SetNillableMemberKey(s *string) *HPAmebloPostUpdateOne
SetNillableMemberKey sets the "member_key" field if the given value is not nil.
func (hapuo *HPAmebloPostUpdateOne) SetNillableNextPath(s *string) *HPAmebloPostUpdateOne
SetNillableNextPath sets the "next_path" field if the given value is not nil.
func (hapuo *HPAmebloPostUpdateOne) SetNillableOwnerArtistID(i *int) *HPAmebloPostUpdateOne
SetNillableOwnerArtistID sets the "owner_artist_id" field if the given value is not nil.
func (hapuo *HPAmebloPostUpdateOne) SetNillableOwnerMemberID(i *int) *HPAmebloPostUpdateOne
SetNillableOwnerMemberID sets the "owner_member_id" field if the given value is not nil.
func (hapuo *HPAmebloPostUpdateOne) SetNillablePrevPath(s *string) *HPAmebloPostUpdateOne
SetNillablePrevPath sets the "prev_path" field if the given value is not nil.
func (hapuo *HPAmebloPostUpdateOne) SetNillableReblogs(i *int) *HPAmebloPostUpdateOne
SetNillableReblogs sets the "reblogs" field if the given value is not nil.
func (hapuo *HPAmebloPostUpdateOne) SetNillableRecrawlRequired(b *bool) *HPAmebloPostUpdateOne
SetNillableRecrawlRequired sets the "recrawl_required" field if the given value is not nil.
func (hapuo *HPAmebloPostUpdateOne) SetNillableTheme(s *string) *HPAmebloPostUpdateOne
SetNillableTheme sets the "theme" field if the given value is not nil.
func (hapuo *HPAmebloPostUpdateOne) SetNillableUpdatedAt(t *time.Time) *HPAmebloPostUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hapuo *HPAmebloPostUpdateOne) SetOwnerArtist(h *HPArtist) *HPAmebloPostUpdateOne
SetOwnerArtist sets the "owner_artist" edge to the HPArtist entity.
func (hapuo *HPAmebloPostUpdateOne) SetOwnerArtistID(i int) *HPAmebloPostUpdateOne
SetOwnerArtistID sets the "owner_artist_id" field.
func (hapuo *HPAmebloPostUpdateOne) SetOwnerMember(h *HPMember) *HPAmebloPostUpdateOne
SetOwnerMember sets the "owner_member" edge to the HPMember entity.
func (hapuo *HPAmebloPostUpdateOne) SetOwnerMemberID(i int) *HPAmebloPostUpdateOne
SetOwnerMemberID sets the "owner_member_id" field.
func (hapuo *HPAmebloPostUpdateOne) SetPath(s string) *HPAmebloPostUpdateOne
SetPath sets the "path" field.
func (hapuo *HPAmebloPostUpdateOne) SetPostAt(t time.Time) *HPAmebloPostUpdateOne
SetPostAt sets the "post_at" field.
func (hapuo *HPAmebloPostUpdateOne) SetPrevPath(s string) *HPAmebloPostUpdateOne
SetPrevPath sets the "prev_path" field.
func (hapuo *HPAmebloPostUpdateOne) SetReblogs(i int) *HPAmebloPostUpdateOne
SetReblogs sets the "reblogs" field.
func (hapuo *HPAmebloPostUpdateOne) SetRecrawlRequired(b bool) *HPAmebloPostUpdateOne
SetRecrawlRequired sets the "recrawl_required" field.
func (hapuo *HPAmebloPostUpdateOne) SetSource(h hpameblopost.Source) *HPAmebloPostUpdateOne
SetSource sets the "source" field.
func (hapuo *HPAmebloPostUpdateOne) SetTheme(s string) *HPAmebloPostUpdateOne
SetTheme sets the "theme" field.
func (hapuo *HPAmebloPostUpdateOne) SetTitle(s string) *HPAmebloPostUpdateOne
SetTitle sets the "title" field.
func (hapuo *HPAmebloPostUpdateOne) SetUpdatedAt(t time.Time) *HPAmebloPostUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (hapuo *HPAmebloPostUpdateOne) Where(ps ...predicate.HPAmebloPost) *HPAmebloPostUpdateOne
Where appends a list predicates to the HPAmebloPostUpdate builder.
HPAmebloPostUpsert is the "OnConflict" setter.
type HPAmebloPostUpsert struct {
*sql.UpdateSet
}
func (u *HPAmebloPostUpsert) AddComments(v int) *HPAmebloPostUpsert
AddComments adds v to the "comments" field.
func (u *HPAmebloPostUpsert) AddErrorCount(v int) *HPAmebloPostUpsert
AddErrorCount adds v to the "error_count" field.
func (u *HPAmebloPostUpsert) AddLikes(v int) *HPAmebloPostUpsert
AddLikes adds v to the "likes" field.
func (u *HPAmebloPostUpsert) AddReblogs(v int) *HPAmebloPostUpsert
AddReblogs adds v to the "reblogs" field.
func (u *HPAmebloPostUpsert) ClearComments() *HPAmebloPostUpsert
ClearComments clears the value of the "comments" field.
func (u *HPAmebloPostUpsert) ClearCrawledAt() *HPAmebloPostUpsert
ClearCrawledAt clears the value of the "crawled_at" field.
func (u *HPAmebloPostUpsert) ClearImages() *HPAmebloPostUpsert
ClearImages clears the value of the "images" field.
func (u *HPAmebloPostUpsert) ClearLastErrorMessage() *HPAmebloPostUpsert
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (u *HPAmebloPostUpsert) ClearLikes() *HPAmebloPostUpsert
ClearLikes clears the value of the "likes" field.
func (u *HPAmebloPostUpsert) ClearManuallyModified() *HPAmebloPostUpsert
ClearManuallyModified clears the value of the "manually_modified" field.
func (u *HPAmebloPostUpsert) ClearMemberKey() *HPAmebloPostUpsert
ClearMemberKey clears the value of the "member_key" field.
func (u *HPAmebloPostUpsert) ClearNextPath() *HPAmebloPostUpsert
ClearNextPath clears the value of the "next_path" field.
func (u *HPAmebloPostUpsert) ClearOwnerArtistID() *HPAmebloPostUpsert
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (u *HPAmebloPostUpsert) ClearOwnerMemberID() *HPAmebloPostUpsert
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (u *HPAmebloPostUpsert) ClearPrevPath() *HPAmebloPostUpsert
ClearPrevPath clears the value of the "prev_path" field.
func (u *HPAmebloPostUpsert) ClearReblogs() *HPAmebloPostUpsert
ClearReblogs clears the value of the "reblogs" field.
func (u *HPAmebloPostUpsert) ClearRecrawlRequired() *HPAmebloPostUpsert
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (u *HPAmebloPostUpsert) ClearTheme() *HPAmebloPostUpsert
ClearTheme clears the value of the "theme" field.
func (u *HPAmebloPostUpsert) ClearUpdatedAt() *HPAmebloPostUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPAmebloPostUpsert) SetArtistKey(v string) *HPAmebloPostUpsert
SetArtistKey sets the "artist_key" field.
func (u *HPAmebloPostUpsert) SetComments(v int) *HPAmebloPostUpsert
SetComments sets the "comments" field.
func (u *HPAmebloPostUpsert) SetCrawledAt(v time.Time) *HPAmebloPostUpsert
SetCrawledAt sets the "crawled_at" field.
func (u *HPAmebloPostUpsert) SetDescription(v string) *HPAmebloPostUpsert
SetDescription sets the "description" field.
func (u *HPAmebloPostUpsert) SetErrorCount(v int) *HPAmebloPostUpsert
SetErrorCount sets the "error_count" field.
func (u *HPAmebloPostUpsert) SetImages(v []jsonfields.Media) *HPAmebloPostUpsert
SetImages sets the "images" field.
func (u *HPAmebloPostUpsert) SetLastErrorMessage(v string) *HPAmebloPostUpsert
SetLastErrorMessage sets the "last_error_message" field.
func (u *HPAmebloPostUpsert) SetLikes(v int) *HPAmebloPostUpsert
SetLikes sets the "likes" field.
func (u *HPAmebloPostUpsert) SetManuallyModified(v *jsonfields.ManuallyModified) *HPAmebloPostUpsert
SetManuallyModified sets the "manually_modified" field.
func (u *HPAmebloPostUpsert) SetMemberKey(v string) *HPAmebloPostUpsert
SetMemberKey sets the "member_key" field.
func (u *HPAmebloPostUpsert) SetNextPath(v string) *HPAmebloPostUpsert
SetNextPath sets the "next_path" field.
func (u *HPAmebloPostUpsert) SetOwnerArtistID(v int) *HPAmebloPostUpsert
SetOwnerArtistID sets the "owner_artist_id" field.
func (u *HPAmebloPostUpsert) SetOwnerMemberID(v int) *HPAmebloPostUpsert
SetOwnerMemberID sets the "owner_member_id" field.
func (u *HPAmebloPostUpsert) SetPath(v string) *HPAmebloPostUpsert
SetPath sets the "path" field.
func (u *HPAmebloPostUpsert) SetPostAt(v time.Time) *HPAmebloPostUpsert
SetPostAt sets the "post_at" field.
func (u *HPAmebloPostUpsert) SetPrevPath(v string) *HPAmebloPostUpsert
SetPrevPath sets the "prev_path" field.
func (u *HPAmebloPostUpsert) SetReblogs(v int) *HPAmebloPostUpsert
SetReblogs sets the "reblogs" field.
func (u *HPAmebloPostUpsert) SetRecrawlRequired(v bool) *HPAmebloPostUpsert
SetRecrawlRequired sets the "recrawl_required" field.
func (u *HPAmebloPostUpsert) SetSource(v hpameblopost.Source) *HPAmebloPostUpsert
SetSource sets the "source" field.
func (u *HPAmebloPostUpsert) SetTheme(v string) *HPAmebloPostUpsert
SetTheme sets the "theme" field.
func (u *HPAmebloPostUpsert) SetTitle(v string) *HPAmebloPostUpsert
SetTitle sets the "title" field.
func (u *HPAmebloPostUpsert) SetUpdatedAt(v time.Time) *HPAmebloPostUpsert
SetUpdatedAt sets the "updated_at" field.
func (u *HPAmebloPostUpsert) UpdateArtistKey() *HPAmebloPostUpsert
UpdateArtistKey sets the "artist_key" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateComments() *HPAmebloPostUpsert
UpdateComments sets the "comments" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateCrawledAt() *HPAmebloPostUpsert
UpdateCrawledAt sets the "crawled_at" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateDescription() *HPAmebloPostUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateErrorCount() *HPAmebloPostUpsert
UpdateErrorCount sets the "error_count" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateImages() *HPAmebloPostUpsert
UpdateImages sets the "images" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateLastErrorMessage() *HPAmebloPostUpsert
UpdateLastErrorMessage sets the "last_error_message" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateLikes() *HPAmebloPostUpsert
UpdateLikes sets the "likes" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateManuallyModified() *HPAmebloPostUpsert
UpdateManuallyModified sets the "manually_modified" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateMemberKey() *HPAmebloPostUpsert
UpdateMemberKey sets the "member_key" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateNextPath() *HPAmebloPostUpsert
UpdateNextPath sets the "next_path" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateOwnerArtistID() *HPAmebloPostUpsert
UpdateOwnerArtistID sets the "owner_artist_id" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateOwnerMemberID() *HPAmebloPostUpsert
UpdateOwnerMemberID sets the "owner_member_id" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdatePath() *HPAmebloPostUpsert
UpdatePath sets the "path" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdatePostAt() *HPAmebloPostUpsert
UpdatePostAt sets the "post_at" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdatePrevPath() *HPAmebloPostUpsert
UpdatePrevPath sets the "prev_path" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateReblogs() *HPAmebloPostUpsert
UpdateReblogs sets the "reblogs" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateRecrawlRequired() *HPAmebloPostUpsert
UpdateRecrawlRequired sets the "recrawl_required" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateSource() *HPAmebloPostUpsert
UpdateSource sets the "source" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateTheme() *HPAmebloPostUpsert
UpdateTheme sets the "theme" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateTitle() *HPAmebloPostUpsert
UpdateTitle sets the "title" field to the value that was provided on create.
func (u *HPAmebloPostUpsert) UpdateUpdatedAt() *HPAmebloPostUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPAmebloPostUpsertBulk is the builder for "upsert"-ing a bulk of HPAmebloPost nodes.
type HPAmebloPostUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *HPAmebloPostUpsertBulk) AddComments(v int) *HPAmebloPostUpsertBulk
AddComments adds v to the "comments" field.
func (u *HPAmebloPostUpsertBulk) AddErrorCount(v int) *HPAmebloPostUpsertBulk
AddErrorCount adds v to the "error_count" field.
func (u *HPAmebloPostUpsertBulk) AddLikes(v int) *HPAmebloPostUpsertBulk
AddLikes adds v to the "likes" field.
func (u *HPAmebloPostUpsertBulk) AddReblogs(v int) *HPAmebloPostUpsertBulk
AddReblogs adds v to the "reblogs" field.
func (u *HPAmebloPostUpsertBulk) ClearComments() *HPAmebloPostUpsertBulk
ClearComments clears the value of the "comments" field.
func (u *HPAmebloPostUpsertBulk) ClearCrawledAt() *HPAmebloPostUpsertBulk
ClearCrawledAt clears the value of the "crawled_at" field.
func (u *HPAmebloPostUpsertBulk) ClearImages() *HPAmebloPostUpsertBulk
ClearImages clears the value of the "images" field.
func (u *HPAmebloPostUpsertBulk) ClearLastErrorMessage() *HPAmebloPostUpsertBulk
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (u *HPAmebloPostUpsertBulk) ClearLikes() *HPAmebloPostUpsertBulk
ClearLikes clears the value of the "likes" field.
func (u *HPAmebloPostUpsertBulk) ClearManuallyModified() *HPAmebloPostUpsertBulk
ClearManuallyModified clears the value of the "manually_modified" field.
func (u *HPAmebloPostUpsertBulk) ClearMemberKey() *HPAmebloPostUpsertBulk
ClearMemberKey clears the value of the "member_key" field.
func (u *HPAmebloPostUpsertBulk) ClearNextPath() *HPAmebloPostUpsertBulk
ClearNextPath clears the value of the "next_path" field.
func (u *HPAmebloPostUpsertBulk) ClearOwnerArtistID() *HPAmebloPostUpsertBulk
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (u *HPAmebloPostUpsertBulk) ClearOwnerMemberID() *HPAmebloPostUpsertBulk
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (u *HPAmebloPostUpsertBulk) ClearPrevPath() *HPAmebloPostUpsertBulk
ClearPrevPath clears the value of the "prev_path" field.
func (u *HPAmebloPostUpsertBulk) ClearReblogs() *HPAmebloPostUpsertBulk
ClearReblogs clears the value of the "reblogs" field.
func (u *HPAmebloPostUpsertBulk) ClearRecrawlRequired() *HPAmebloPostUpsertBulk
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (u *HPAmebloPostUpsertBulk) ClearTheme() *HPAmebloPostUpsertBulk
ClearTheme clears the value of the "theme" field.
func (u *HPAmebloPostUpsertBulk) ClearUpdatedAt() *HPAmebloPostUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPAmebloPostUpsertBulk) DoNothing() *HPAmebloPostUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPAmebloPostUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPAmebloPostUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPAmebloPostUpsertBulk) Ignore() *HPAmebloPostUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPAmebloPost.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *HPAmebloPostUpsertBulk) SetArtistKey(v string) *HPAmebloPostUpsertBulk
SetArtistKey sets the "artist_key" field.
func (u *HPAmebloPostUpsertBulk) SetComments(v int) *HPAmebloPostUpsertBulk
SetComments sets the "comments" field.
func (u *HPAmebloPostUpsertBulk) SetCrawledAt(v time.Time) *HPAmebloPostUpsertBulk
SetCrawledAt sets the "crawled_at" field.
func (u *HPAmebloPostUpsertBulk) SetDescription(v string) *HPAmebloPostUpsertBulk
SetDescription sets the "description" field.
func (u *HPAmebloPostUpsertBulk) SetErrorCount(v int) *HPAmebloPostUpsertBulk
SetErrorCount sets the "error_count" field.
func (u *HPAmebloPostUpsertBulk) SetImages(v []jsonfields.Media) *HPAmebloPostUpsertBulk
SetImages sets the "images" field.
func (u *HPAmebloPostUpsertBulk) SetLastErrorMessage(v string) *HPAmebloPostUpsertBulk
SetLastErrorMessage sets the "last_error_message" field.
func (u *HPAmebloPostUpsertBulk) SetLikes(v int) *HPAmebloPostUpsertBulk
SetLikes sets the "likes" field.
func (u *HPAmebloPostUpsertBulk) SetManuallyModified(v *jsonfields.ManuallyModified) *HPAmebloPostUpsertBulk
SetManuallyModified sets the "manually_modified" field.
func (u *HPAmebloPostUpsertBulk) SetMemberKey(v string) *HPAmebloPostUpsertBulk
SetMemberKey sets the "member_key" field.
func (u *HPAmebloPostUpsertBulk) SetNextPath(v string) *HPAmebloPostUpsertBulk
SetNextPath sets the "next_path" field.
func (u *HPAmebloPostUpsertBulk) SetOwnerArtistID(v int) *HPAmebloPostUpsertBulk
SetOwnerArtistID sets the "owner_artist_id" field.
func (u *HPAmebloPostUpsertBulk) SetOwnerMemberID(v int) *HPAmebloPostUpsertBulk
SetOwnerMemberID sets the "owner_member_id" field.
func (u *HPAmebloPostUpsertBulk) SetPath(v string) *HPAmebloPostUpsertBulk
SetPath sets the "path" field.
func (u *HPAmebloPostUpsertBulk) SetPostAt(v time.Time) *HPAmebloPostUpsertBulk
SetPostAt sets the "post_at" field.
func (u *HPAmebloPostUpsertBulk) SetPrevPath(v string) *HPAmebloPostUpsertBulk
SetPrevPath sets the "prev_path" field.
func (u *HPAmebloPostUpsertBulk) SetReblogs(v int) *HPAmebloPostUpsertBulk
SetReblogs sets the "reblogs" field.
func (u *HPAmebloPostUpsertBulk) SetRecrawlRequired(v bool) *HPAmebloPostUpsertBulk
SetRecrawlRequired sets the "recrawl_required" field.
func (u *HPAmebloPostUpsertBulk) SetSource(v hpameblopost.Source) *HPAmebloPostUpsertBulk
SetSource sets the "source" field.
func (u *HPAmebloPostUpsertBulk) SetTheme(v string) *HPAmebloPostUpsertBulk
SetTheme sets the "theme" field.
func (u *HPAmebloPostUpsertBulk) SetTitle(v string) *HPAmebloPostUpsertBulk
SetTitle sets the "title" field.
func (u *HPAmebloPostUpsertBulk) SetUpdatedAt(v time.Time) *HPAmebloPostUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (u *HPAmebloPostUpsertBulk) Update(set func(*HPAmebloPostUpsert)) *HPAmebloPostUpsertBulk
Update allows overriding fields `UPDATE` values. See the HPAmebloPostCreateBulk.OnConflict documentation for more info.
func (u *HPAmebloPostUpsertBulk) UpdateArtistKey() *HPAmebloPostUpsertBulk
UpdateArtistKey sets the "artist_key" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateComments() *HPAmebloPostUpsertBulk
UpdateComments sets the "comments" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateCrawledAt() *HPAmebloPostUpsertBulk
UpdateCrawledAt sets the "crawled_at" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateDescription() *HPAmebloPostUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateErrorCount() *HPAmebloPostUpsertBulk
UpdateErrorCount sets the "error_count" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateImages() *HPAmebloPostUpsertBulk
UpdateImages sets the "images" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateLastErrorMessage() *HPAmebloPostUpsertBulk
UpdateLastErrorMessage sets the "last_error_message" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateLikes() *HPAmebloPostUpsertBulk
UpdateLikes sets the "likes" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateManuallyModified() *HPAmebloPostUpsertBulk
UpdateManuallyModified sets the "manually_modified" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateMemberKey() *HPAmebloPostUpsertBulk
UpdateMemberKey sets the "member_key" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateNewValues() *HPAmebloPostUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPAmebloPost.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPAmebloPostUpsertBulk) UpdateNextPath() *HPAmebloPostUpsertBulk
UpdateNextPath sets the "next_path" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateOwnerArtistID() *HPAmebloPostUpsertBulk
UpdateOwnerArtistID sets the "owner_artist_id" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateOwnerMemberID() *HPAmebloPostUpsertBulk
UpdateOwnerMemberID sets the "owner_member_id" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdatePath() *HPAmebloPostUpsertBulk
UpdatePath sets the "path" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdatePostAt() *HPAmebloPostUpsertBulk
UpdatePostAt sets the "post_at" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdatePrevPath() *HPAmebloPostUpsertBulk
UpdatePrevPath sets the "prev_path" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateReblogs() *HPAmebloPostUpsertBulk
UpdateReblogs sets the "reblogs" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateRecrawlRequired() *HPAmebloPostUpsertBulk
UpdateRecrawlRequired sets the "recrawl_required" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateSource() *HPAmebloPostUpsertBulk
UpdateSource sets the "source" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateTheme() *HPAmebloPostUpsertBulk
UpdateTheme sets the "theme" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateTitle() *HPAmebloPostUpsertBulk
UpdateTitle sets the "title" field to the value that was provided on create.
func (u *HPAmebloPostUpsertBulk) UpdateUpdatedAt() *HPAmebloPostUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPAmebloPostUpsertOne is the builder for "upsert"-ing
one HPAmebloPost node.
type HPAmebloPostUpsertOne struct {
// contains filtered or unexported fields
}
func (u *HPAmebloPostUpsertOne) AddComments(v int) *HPAmebloPostUpsertOne
AddComments adds v to the "comments" field.
func (u *HPAmebloPostUpsertOne) AddErrorCount(v int) *HPAmebloPostUpsertOne
AddErrorCount adds v to the "error_count" field.
func (u *HPAmebloPostUpsertOne) AddLikes(v int) *HPAmebloPostUpsertOne
AddLikes adds v to the "likes" field.
func (u *HPAmebloPostUpsertOne) AddReblogs(v int) *HPAmebloPostUpsertOne
AddReblogs adds v to the "reblogs" field.
func (u *HPAmebloPostUpsertOne) ClearComments() *HPAmebloPostUpsertOne
ClearComments clears the value of the "comments" field.
func (u *HPAmebloPostUpsertOne) ClearCrawledAt() *HPAmebloPostUpsertOne
ClearCrawledAt clears the value of the "crawled_at" field.
func (u *HPAmebloPostUpsertOne) ClearImages() *HPAmebloPostUpsertOne
ClearImages clears the value of the "images" field.
func (u *HPAmebloPostUpsertOne) ClearLastErrorMessage() *HPAmebloPostUpsertOne
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (u *HPAmebloPostUpsertOne) ClearLikes() *HPAmebloPostUpsertOne
ClearLikes clears the value of the "likes" field.
func (u *HPAmebloPostUpsertOne) ClearManuallyModified() *HPAmebloPostUpsertOne
ClearManuallyModified clears the value of the "manually_modified" field.
func (u *HPAmebloPostUpsertOne) ClearMemberKey() *HPAmebloPostUpsertOne
ClearMemberKey clears the value of the "member_key" field.
func (u *HPAmebloPostUpsertOne) ClearNextPath() *HPAmebloPostUpsertOne
ClearNextPath clears the value of the "next_path" field.
func (u *HPAmebloPostUpsertOne) ClearOwnerArtistID() *HPAmebloPostUpsertOne
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (u *HPAmebloPostUpsertOne) ClearOwnerMemberID() *HPAmebloPostUpsertOne
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (u *HPAmebloPostUpsertOne) ClearPrevPath() *HPAmebloPostUpsertOne
ClearPrevPath clears the value of the "prev_path" field.
func (u *HPAmebloPostUpsertOne) ClearReblogs() *HPAmebloPostUpsertOne
ClearReblogs clears the value of the "reblogs" field.
func (u *HPAmebloPostUpsertOne) ClearRecrawlRequired() *HPAmebloPostUpsertOne
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (u *HPAmebloPostUpsertOne) ClearTheme() *HPAmebloPostUpsertOne
ClearTheme clears the value of the "theme" field.
func (u *HPAmebloPostUpsertOne) ClearUpdatedAt() *HPAmebloPostUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPAmebloPostUpsertOne) DoNothing() *HPAmebloPostUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPAmebloPostUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPAmebloPostUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPAmebloPostUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *HPAmebloPostUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *HPAmebloPostUpsertOne) Ignore() *HPAmebloPostUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPAmebloPost.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *HPAmebloPostUpsertOne) SetArtistKey(v string) *HPAmebloPostUpsertOne
SetArtistKey sets the "artist_key" field.
func (u *HPAmebloPostUpsertOne) SetComments(v int) *HPAmebloPostUpsertOne
SetComments sets the "comments" field.
func (u *HPAmebloPostUpsertOne) SetCrawledAt(v time.Time) *HPAmebloPostUpsertOne
SetCrawledAt sets the "crawled_at" field.
func (u *HPAmebloPostUpsertOne) SetDescription(v string) *HPAmebloPostUpsertOne
SetDescription sets the "description" field.
func (u *HPAmebloPostUpsertOne) SetErrorCount(v int) *HPAmebloPostUpsertOne
SetErrorCount sets the "error_count" field.
func (u *HPAmebloPostUpsertOne) SetImages(v []jsonfields.Media) *HPAmebloPostUpsertOne
SetImages sets the "images" field.
func (u *HPAmebloPostUpsertOne) SetLastErrorMessage(v string) *HPAmebloPostUpsertOne
SetLastErrorMessage sets the "last_error_message" field.
func (u *HPAmebloPostUpsertOne) SetLikes(v int) *HPAmebloPostUpsertOne
SetLikes sets the "likes" field.
func (u *HPAmebloPostUpsertOne) SetManuallyModified(v *jsonfields.ManuallyModified) *HPAmebloPostUpsertOne
SetManuallyModified sets the "manually_modified" field.
func (u *HPAmebloPostUpsertOne) SetMemberKey(v string) *HPAmebloPostUpsertOne
SetMemberKey sets the "member_key" field.
func (u *HPAmebloPostUpsertOne) SetNextPath(v string) *HPAmebloPostUpsertOne
SetNextPath sets the "next_path" field.
func (u *HPAmebloPostUpsertOne) SetOwnerArtistID(v int) *HPAmebloPostUpsertOne
SetOwnerArtistID sets the "owner_artist_id" field.
func (u *HPAmebloPostUpsertOne) SetOwnerMemberID(v int) *HPAmebloPostUpsertOne
SetOwnerMemberID sets the "owner_member_id" field.
func (u *HPAmebloPostUpsertOne) SetPath(v string) *HPAmebloPostUpsertOne
SetPath sets the "path" field.
func (u *HPAmebloPostUpsertOne) SetPostAt(v time.Time) *HPAmebloPostUpsertOne
SetPostAt sets the "post_at" field.
func (u *HPAmebloPostUpsertOne) SetPrevPath(v string) *HPAmebloPostUpsertOne
SetPrevPath sets the "prev_path" field.
func (u *HPAmebloPostUpsertOne) SetReblogs(v int) *HPAmebloPostUpsertOne
SetReblogs sets the "reblogs" field.
func (u *HPAmebloPostUpsertOne) SetRecrawlRequired(v bool) *HPAmebloPostUpsertOne
SetRecrawlRequired sets the "recrawl_required" field.
func (u *HPAmebloPostUpsertOne) SetSource(v hpameblopost.Source) *HPAmebloPostUpsertOne
SetSource sets the "source" field.
func (u *HPAmebloPostUpsertOne) SetTheme(v string) *HPAmebloPostUpsertOne
SetTheme sets the "theme" field.
func (u *HPAmebloPostUpsertOne) SetTitle(v string) *HPAmebloPostUpsertOne
SetTitle sets the "title" field.
func (u *HPAmebloPostUpsertOne) SetUpdatedAt(v time.Time) *HPAmebloPostUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (u *HPAmebloPostUpsertOne) Update(set func(*HPAmebloPostUpsert)) *HPAmebloPostUpsertOne
Update allows overriding fields `UPDATE` values. See the HPAmebloPostCreate.OnConflict documentation for more info.
func (u *HPAmebloPostUpsertOne) UpdateArtistKey() *HPAmebloPostUpsertOne
UpdateArtistKey sets the "artist_key" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateComments() *HPAmebloPostUpsertOne
UpdateComments sets the "comments" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateCrawledAt() *HPAmebloPostUpsertOne
UpdateCrawledAt sets the "crawled_at" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateDescription() *HPAmebloPostUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateErrorCount() *HPAmebloPostUpsertOne
UpdateErrorCount sets the "error_count" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateImages() *HPAmebloPostUpsertOne
UpdateImages sets the "images" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateLastErrorMessage() *HPAmebloPostUpsertOne
UpdateLastErrorMessage sets the "last_error_message" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateLikes() *HPAmebloPostUpsertOne
UpdateLikes sets the "likes" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateManuallyModified() *HPAmebloPostUpsertOne
UpdateManuallyModified sets the "manually_modified" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateMemberKey() *HPAmebloPostUpsertOne
UpdateMemberKey sets the "member_key" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateNewValues() *HPAmebloPostUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPAmebloPost.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPAmebloPostUpsertOne) UpdateNextPath() *HPAmebloPostUpsertOne
UpdateNextPath sets the "next_path" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateOwnerArtistID() *HPAmebloPostUpsertOne
UpdateOwnerArtistID sets the "owner_artist_id" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateOwnerMemberID() *HPAmebloPostUpsertOne
UpdateOwnerMemberID sets the "owner_member_id" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdatePath() *HPAmebloPostUpsertOne
UpdatePath sets the "path" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdatePostAt() *HPAmebloPostUpsertOne
UpdatePostAt sets the "post_at" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdatePrevPath() *HPAmebloPostUpsertOne
UpdatePrevPath sets the "prev_path" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateReblogs() *HPAmebloPostUpsertOne
UpdateReblogs sets the "reblogs" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateRecrawlRequired() *HPAmebloPostUpsertOne
UpdateRecrawlRequired sets the "recrawl_required" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateSource() *HPAmebloPostUpsertOne
UpdateSource sets the "source" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateTheme() *HPAmebloPostUpsertOne
UpdateTheme sets the "theme" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateTitle() *HPAmebloPostUpsertOne
UpdateTitle sets the "title" field to the value that was provided on create.
func (u *HPAmebloPostUpsertOne) UpdateUpdatedAt() *HPAmebloPostUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPAmebloPosts is a parsable slice of HPAmebloPost.
type HPAmebloPosts []*HPAmebloPost
HPArtist is the model entity for the HPArtist schema.
type HPArtist struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CrawledAt holds the value of the "crawled_at" field.
CrawledAt *time.Time `json:"crawled_at,omitempty"`
// ErrorCount holds the value of the "error_count" field.
ErrorCount int `json:"error_count,omitempty"`
// ManuallyModified holds the value of the "manually_modified" field.
ManuallyModified *jsonfields.ManuallyModified `json:"manually_modified,omitempty"`
// LastErrorMessage holds the value of the "last_error_message" field.
LastErrorMessage *string `json:"last_error_message,omitempty"`
// RecrawlRequired holds the value of the "recrawl_required" field.
RecrawlRequired bool `json:"recrawl_required,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Key holds the value of the "key" field.
Key string `json:"key,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// ThumbnailURL holds the value of the "thumbnail_url" field.
ThumbnailURL string `json:"thumbnail_url,omitempty"`
// Index holds the value of the "index" field.
Index int `json:"index,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the HPArtistQuery when eager-loading is set.
Edges HPArtistEdges `json:"edges"`
// contains filtered or unexported fields
}
func (n *HPArtist) IsNode()
IsNode implements the Node interface check for GQLGen.
func (ha *HPArtist) Members(ctx context.Context) (result []*HPMember, err error)
func (ha *HPArtist) NamedAssets(name string) ([]*HPAsset, error)
NamedAssets returns the Assets named value or an error if the edge was not loaded in eager-loading with this name.
func (ha *HPArtist) NamedMembers(name string) ([]*HPMember, error)
NamedMembers returns the Members named value or an error if the edge was not loaded in eager-loading with this name.
func (ha *HPArtist) NamedOwningAmebloPosts(name string) ([]*HPAmebloPost, error)
NamedOwningAmebloPosts returns the OwningAmebloPosts named value or an error if the edge was not loaded in eager-loading with this name.
func (ha *HPArtist) NamedOwningFeed(name string) ([]*HPFeedItem, error)
NamedOwningFeed returns the OwningFeed named value or an error if the edge was not loaded in eager-loading with this name.
func (ha *HPArtist) NamedOwningIgPosts(name string) ([]*HPIgPost, error)
NamedOwningIgPosts returns the OwningIgPosts named value or an error if the edge was not loaded in eager-loading with this name.
func (ha *HPArtist) NamedTaggedAmebloPosts(name string) ([]*HPAmebloPost, error)
NamedTaggedAmebloPosts returns the TaggedAmebloPosts named value or an error if the edge was not loaded in eager-loading with this name.
func (ha *HPArtist) NamedTaggedElineupMallItems(name string) ([]*HPElineupMallItem, error)
NamedTaggedElineupMallItems returns the TaggedElineupMallItems named value or an error if the edge was not loaded in eager-loading with this name.
func (ha *HPArtist) NamedTaggedFeed(name string) ([]*HPFeedItem, error)
NamedTaggedFeed returns the TaggedFeed named value or an error if the edge was not loaded in eager-loading with this name.
func (ha *HPArtist) NamedTaggedIgPosts(name string) ([]*HPIgPost, error)
NamedTaggedIgPosts returns the TaggedIgPosts named value or an error if the edge was not loaded in eager-loading with this name.
func (ha *HPArtist) QueryAssets() *HPAssetQuery
QueryAssets queries the "assets" edge of the HPArtist entity.
func (ha *HPArtist) QueryMembers() *HPMemberQuery
QueryMembers queries the "members" edge of the HPArtist entity.
func (ha *HPArtist) QueryOwningAmebloPosts() *HPAmebloPostQuery
QueryOwningAmebloPosts queries the "owning_ameblo_posts" edge of the HPArtist entity.
func (ha *HPArtist) QueryOwningFeed() *HPFeedItemQuery
QueryOwningFeed queries the "owning_feed" edge of the HPArtist entity.
func (ha *HPArtist) QueryOwningIgPosts() *HPIgPostQuery
QueryOwningIgPosts queries the "owning_ig_posts" edge of the HPArtist entity.
func (ha *HPArtist) QueryTaggedAmebloPosts() *HPAmebloPostQuery
QueryTaggedAmebloPosts queries the "tagged_ameblo_posts" edge of the HPArtist entity.
func (ha *HPArtist) QueryTaggedElineupMallItems() *HPElineupMallItemQuery
QueryTaggedElineupMallItems queries the "tagged_elineup_mall_items" edge of the HPArtist entity.
func (ha *HPArtist) QueryTaggedFeed() *HPFeedItemQuery
QueryTaggedFeed queries the "tagged_feed" edge of the HPArtist entity.
func (ha *HPArtist) QueryTaggedIgPosts() *HPIgPostQuery
QueryTaggedIgPosts queries the "tagged_ig_posts" edge of the HPArtist entity.
func (ha *HPArtist) String() string
String implements the fmt.Stringer.
func (ha *HPArtist) ToEdge(order *HPArtistOrder) *HPArtistEdge
ToEdge converts HPArtist into HPArtistEdge.
func (ha *HPArtist) Unwrap() *HPArtist
Unwrap unwraps the HPArtist entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (ha *HPArtist) Update() *HPArtistUpdateOne
Update returns a builder for updating this HPArtist. Note that you need to call HPArtist.Unwrap() before calling this method if this HPArtist was returned from a transaction, and the transaction was committed or rolled back.
func (ha *HPArtist) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the HPArtist. This includes values selected through modifiers, order, etc.
HPArtistClient is a client for the HPArtist schema.
type HPArtistClient struct {
// contains filtered or unexported fields
}
func NewHPArtistClient(c config) *HPArtistClient
NewHPArtistClient returns a client for the HPArtist from the given config.
func (c *HPArtistClient) Create() *HPArtistCreate
Create returns a builder for creating a HPArtist entity.
func (c *HPArtistClient) CreateBulk(builders ...*HPArtistCreate) *HPArtistCreateBulk
CreateBulk returns a builder for creating a bulk of HPArtist entities.
func (c *HPArtistClient) Delete() *HPArtistDelete
Delete returns a delete builder for HPArtist.
func (c *HPArtistClient) DeleteOne(ha *HPArtist) *HPArtistDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *HPArtistClient) DeleteOneID(id int) *HPArtistDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *HPArtistClient) Get(ctx context.Context, id int) (*HPArtist, error)
Get returns a HPArtist entity by its id.
func (c *HPArtistClient) GetX(ctx context.Context, id int) *HPArtist
GetX is like Get, but panics if an error occurs.
func (c *HPArtistClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *HPArtistClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hpartist.Intercept(f(g(h())))`.
func (c *HPArtistClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *HPArtistClient) Query() *HPArtistQuery
Query returns a query builder for HPArtist.
func (c *HPArtistClient) QueryAssets(ha *HPArtist) *HPAssetQuery
QueryAssets queries the assets edge of a HPArtist.
func (c *HPArtistClient) QueryMembers(ha *HPArtist) *HPMemberQuery
QueryMembers queries the members edge of a HPArtist.
func (c *HPArtistClient) QueryOwningAmebloPosts(ha *HPArtist) *HPAmebloPostQuery
QueryOwningAmebloPosts queries the owning_ameblo_posts edge of a HPArtist.
func (c *HPArtistClient) QueryOwningFeed(ha *HPArtist) *HPFeedItemQuery
QueryOwningFeed queries the owning_feed edge of a HPArtist.
func (c *HPArtistClient) QueryOwningIgPosts(ha *HPArtist) *HPIgPostQuery
QueryOwningIgPosts queries the owning_ig_posts edge of a HPArtist.
func (c *HPArtistClient) QueryTaggedAmebloPosts(ha *HPArtist) *HPAmebloPostQuery
QueryTaggedAmebloPosts queries the tagged_ameblo_posts edge of a HPArtist.
func (c *HPArtistClient) QueryTaggedElineupMallItems(ha *HPArtist) *HPElineupMallItemQuery
QueryTaggedElineupMallItems queries the tagged_elineup_mall_items edge of a HPArtist.
func (c *HPArtistClient) QueryTaggedFeed(ha *HPArtist) *HPFeedItemQuery
QueryTaggedFeed queries the tagged_feed edge of a HPArtist.
func (c *HPArtistClient) QueryTaggedIgPosts(ha *HPArtist) *HPIgPostQuery
QueryTaggedIgPosts queries the tagged_ig_posts edge of a HPArtist.
func (c *HPArtistClient) Update() *HPArtistUpdate
Update returns an update builder for HPArtist.
func (c *HPArtistClient) UpdateOne(ha *HPArtist) *HPArtistUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *HPArtistClient) UpdateOneID(id int) *HPArtistUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *HPArtistClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hpartist.Hooks(f(g(h())))`.
HPArtistConnection is the connection containing edges to HPArtist.
type HPArtistConnection struct {
Edges []*HPArtistEdge `json:"edges"`
PageInfo PageInfo `json:"pageInfo"`
TotalCount int `json:"totalCount"`
}
HPArtistCreate is the builder for creating a HPArtist entity.
type HPArtistCreate struct {
// contains filtered or unexported fields
}
func (hac *HPArtistCreate) AddAssetIDs(ids ...int) *HPArtistCreate
AddAssetIDs adds the "assets" edge to the HPAsset entity by IDs.
func (hac *HPArtistCreate) AddAssets(h ...*HPAsset) *HPArtistCreate
AddAssets adds the "assets" edges to the HPAsset entity.
func (hac *HPArtistCreate) AddMemberIDs(ids ...int) *HPArtistCreate
AddMemberIDs adds the "members" edge to the HPMember entity by IDs.
func (hac *HPArtistCreate) AddMembers(h ...*HPMember) *HPArtistCreate
AddMembers adds the "members" edges to the HPMember entity.
func (hac *HPArtistCreate) AddOwningAmebloPostIDs(ids ...int) *HPArtistCreate
AddOwningAmebloPostIDs adds the "owning_ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hac *HPArtistCreate) AddOwningAmebloPosts(h ...*HPAmebloPost) *HPArtistCreate
AddOwningAmebloPosts adds the "owning_ameblo_posts" edges to the HPAmebloPost entity.
func (hac *HPArtistCreate) AddOwningFeed(h ...*HPFeedItem) *HPArtistCreate
AddOwningFeed adds the "owning_feed" edges to the HPFeedItem entity.
func (hac *HPArtistCreate) AddOwningFeedIDs(ids ...int) *HPArtistCreate
AddOwningFeedIDs adds the "owning_feed" edge to the HPFeedItem entity by IDs.
func (hac *HPArtistCreate) AddOwningIgPostIDs(ids ...int) *HPArtistCreate
AddOwningIgPostIDs adds the "owning_ig_posts" edge to the HPIgPost entity by IDs.
func (hac *HPArtistCreate) AddOwningIgPosts(h ...*HPIgPost) *HPArtistCreate
AddOwningIgPosts adds the "owning_ig_posts" edges to the HPIgPost entity.
func (hac *HPArtistCreate) AddTaggedAmebloPostIDs(ids ...int) *HPArtistCreate
AddTaggedAmebloPostIDs adds the "tagged_ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hac *HPArtistCreate) AddTaggedAmebloPosts(h ...*HPAmebloPost) *HPArtistCreate
AddTaggedAmebloPosts adds the "tagged_ameblo_posts" edges to the HPAmebloPost entity.
func (hac *HPArtistCreate) AddTaggedElineupMallItemIDs(ids ...int) *HPArtistCreate
AddTaggedElineupMallItemIDs adds the "tagged_elineup_mall_items" edge to the HPElineupMallItem entity by IDs.
func (hac *HPArtistCreate) AddTaggedElineupMallItems(h ...*HPElineupMallItem) *HPArtistCreate
AddTaggedElineupMallItems adds the "tagged_elineup_mall_items" edges to the HPElineupMallItem entity.
func (hac *HPArtistCreate) AddTaggedFeed(h ...*HPFeedItem) *HPArtistCreate
AddTaggedFeed adds the "tagged_feed" edges to the HPFeedItem entity.
func (hac *HPArtistCreate) AddTaggedFeedIDs(ids ...int) *HPArtistCreate
AddTaggedFeedIDs adds the "tagged_feed" edge to the HPFeedItem entity by IDs.
func (hac *HPArtistCreate) AddTaggedIgPostIDs(ids ...int) *HPArtistCreate
AddTaggedIgPostIDs adds the "tagged_ig_posts" edge to the HPIgPost entity by IDs.
func (hac *HPArtistCreate) AddTaggedIgPosts(h ...*HPIgPost) *HPArtistCreate
AddTaggedIgPosts adds the "tagged_ig_posts" edges to the HPIgPost entity.
func (hac *HPArtistCreate) Exec(ctx context.Context) error
Exec executes the query.
func (hac *HPArtistCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hac *HPArtistCreate) Mutation() *HPArtistMutation
Mutation returns the HPArtistMutation object of the builder.
func (hac *HPArtistCreate) OnConflict(opts ...sql.ConflictOption) *HPArtistUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPArtist.Create().
SetCrawledAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPArtistUpsert) {
SetCrawledAt(v+v).
}).
Exec(ctx)
func (hac *HPArtistCreate) OnConflictColumns(columns ...string) *HPArtistUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPArtist.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hac *HPArtistCreate) Save(ctx context.Context) (*HPArtist, error)
Save creates the HPArtist in the database.
func (hac *HPArtistCreate) SaveX(ctx context.Context) *HPArtist
SaveX calls Save and panics if Save returns an error.
func (hac *HPArtistCreate) SetCrawledAt(t time.Time) *HPArtistCreate
SetCrawledAt sets the "crawled_at" field.
func (hac *HPArtistCreate) SetCreatedAt(t time.Time) *HPArtistCreate
SetCreatedAt sets the "created_at" field.
func (hac *HPArtistCreate) SetErrorCount(i int) *HPArtistCreate
SetErrorCount sets the "error_count" field.
func (hac *HPArtistCreate) SetIndex(i int) *HPArtistCreate
SetIndex sets the "index" field.
func (hac *HPArtistCreate) SetKey(s string) *HPArtistCreate
SetKey sets the "key" field.
func (hac *HPArtistCreate) SetLastErrorMessage(s string) *HPArtistCreate
SetLastErrorMessage sets the "last_error_message" field.
func (hac *HPArtistCreate) SetManuallyModified(jm *jsonfields.ManuallyModified) *HPArtistCreate
SetManuallyModified sets the "manually_modified" field.
func (hac *HPArtistCreate) SetName(s string) *HPArtistCreate
SetName sets the "name" field.
func (hac *HPArtistCreate) SetNillableCrawledAt(t *time.Time) *HPArtistCreate
SetNillableCrawledAt sets the "crawled_at" field if the given value is not nil.
func (hac *HPArtistCreate) SetNillableCreatedAt(t *time.Time) *HPArtistCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (hac *HPArtistCreate) SetNillableErrorCount(i *int) *HPArtistCreate
SetNillableErrorCount sets the "error_count" field if the given value is not nil.
func (hac *HPArtistCreate) SetNillableLastErrorMessage(s *string) *HPArtistCreate
SetNillableLastErrorMessage sets the "last_error_message" field if the given value is not nil.
func (hac *HPArtistCreate) SetNillableRecrawlRequired(b *bool) *HPArtistCreate
SetNillableRecrawlRequired sets the "recrawl_required" field if the given value is not nil.
func (hac *HPArtistCreate) SetNillableUpdatedAt(t *time.Time) *HPArtistCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hac *HPArtistCreate) SetRecrawlRequired(b bool) *HPArtistCreate
SetRecrawlRequired sets the "recrawl_required" field.
func (hac *HPArtistCreate) SetThumbnailURL(s string) *HPArtistCreate
SetThumbnailURL sets the "thumbnail_url" field.
func (hac *HPArtistCreate) SetUpdatedAt(t time.Time) *HPArtistCreate
SetUpdatedAt sets the "updated_at" field.
HPArtistCreateBulk is the builder for creating many HPArtist entities in bulk.
type HPArtistCreateBulk struct {
// contains filtered or unexported fields
}
func (hacb *HPArtistCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (hacb *HPArtistCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hacb *HPArtistCreateBulk) OnConflict(opts ...sql.ConflictOption) *HPArtistUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPArtist.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPArtistUpsert) {
SetCrawledAt(v+v).
}).
Exec(ctx)
func (hacb *HPArtistCreateBulk) OnConflictColumns(columns ...string) *HPArtistUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPArtist.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hacb *HPArtistCreateBulk) Save(ctx context.Context) ([]*HPArtist, error)
Save creates the HPArtist entities in the database.
func (hacb *HPArtistCreateBulk) SaveX(ctx context.Context) []*HPArtist
SaveX is like Save, but panics if an error occurs.
HPArtistDelete is the builder for deleting a HPArtist entity.
type HPArtistDelete struct {
// contains filtered or unexported fields
}
func (had *HPArtistDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (had *HPArtistDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (had *HPArtistDelete) Where(ps ...predicate.HPArtist) *HPArtistDelete
Where appends a list predicates to the HPArtistDelete builder.
HPArtistDeleteOne is the builder for deleting a single HPArtist entity.
type HPArtistDeleteOne struct {
// contains filtered or unexported fields
}
func (hado *HPArtistDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (hado *HPArtistDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hado *HPArtistDeleteOne) Where(ps ...predicate.HPArtist) *HPArtistDeleteOne
Where appends a list predicates to the HPArtistDelete builder.
HPArtistEdge is the edge representation of HPArtist.
type HPArtistEdge struct {
Node *HPArtist `json:"node"`
Cursor Cursor `json:"cursor"`
}
HPArtistEdges holds the relations/edges for other nodes in the graph.
type HPArtistEdges struct {
// Members holds the value of the members edge.
Members []*HPMember `json:"members,omitempty"`
// Assets holds the value of the assets edge.
Assets []*HPAsset `json:"assets,omitempty"`
// OwningFeed holds the value of the owning_feed edge.
OwningFeed []*HPFeedItem `json:"owning_feed,omitempty"`
// TaggedFeed holds the value of the tagged_feed edge.
TaggedFeed []*HPFeedItem `json:"tagged_feed,omitempty"`
// OwningIgPosts holds the value of the owning_ig_posts edge.
OwningIgPosts []*HPIgPost `json:"owning_ig_posts,omitempty"`
// TaggedIgPosts holds the value of the tagged_ig_posts edge.
TaggedIgPosts []*HPIgPost `json:"tagged_ig_posts,omitempty"`
// OwningAmebloPosts holds the value of the owning_ameblo_posts edge.
OwningAmebloPosts []*HPAmebloPost `json:"owning_ameblo_posts,omitempty"`
// TaggedAmebloPosts holds the value of the tagged_ameblo_posts edge.
TaggedAmebloPosts []*HPAmebloPost `json:"tagged_ameblo_posts,omitempty"`
// TaggedElineupMallItems holds the value of the tagged_elineup_mall_items edge.
TaggedElineupMallItems []*HPElineupMallItem `json:"tagged_elineup_mall_items,omitempty"`
// contains filtered or unexported fields
}
func (e HPArtistEdges) AssetsOrErr() ([]*HPAsset, error)
AssetsOrErr returns the Assets value or an error if the edge was not loaded in eager-loading.
func (e HPArtistEdges) MembersOrErr() ([]*HPMember, error)
MembersOrErr returns the Members value or an error if the edge was not loaded in eager-loading.
func (e HPArtistEdges) OwningAmebloPostsOrErr() ([]*HPAmebloPost, error)
OwningAmebloPostsOrErr returns the OwningAmebloPosts value or an error if the edge was not loaded in eager-loading.
func (e HPArtistEdges) OwningFeedOrErr() ([]*HPFeedItem, error)
OwningFeedOrErr returns the OwningFeed value or an error if the edge was not loaded in eager-loading.
func (e HPArtistEdges) OwningIgPostsOrErr() ([]*HPIgPost, error)
OwningIgPostsOrErr returns the OwningIgPosts value or an error if the edge was not loaded in eager-loading.
func (e HPArtistEdges) TaggedAmebloPostsOrErr() ([]*HPAmebloPost, error)
TaggedAmebloPostsOrErr returns the TaggedAmebloPosts value or an error if the edge was not loaded in eager-loading.
func (e HPArtistEdges) TaggedElineupMallItemsOrErr() ([]*HPElineupMallItem, error)
TaggedElineupMallItemsOrErr returns the TaggedElineupMallItems value or an error if the edge was not loaded in eager-loading.
func (e HPArtistEdges) TaggedFeedOrErr() ([]*HPFeedItem, error)
TaggedFeedOrErr returns the TaggedFeed value or an error if the edge was not loaded in eager-loading.
func (e HPArtistEdges) TaggedIgPostsOrErr() ([]*HPIgPost, error)
TaggedIgPostsOrErr returns the TaggedIgPosts value or an error if the edge was not loaded in eager-loading.
HPArtistFilter provides a generic filtering capability at runtime for HPArtistQuery.
type HPArtistFilter struct {
// contains filtered or unexported fields
}
func (f *HPArtistFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *HPArtistFilter) WhereCrawledAt(p entql.TimeP)
WhereCrawledAt applies the entql time.Time predicate on the crawled_at field.
func (f *HPArtistFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (f *HPArtistFilter) WhereErrorCount(p entql.IntP)
WhereErrorCount applies the entql int predicate on the error_count field.
func (f *HPArtistFilter) WhereHasAssets()
WhereHasAssets applies a predicate to check if query has an edge assets.
func (f *HPArtistFilter) WhereHasAssetsWith(preds ...predicate.HPAsset)
WhereHasAssetsWith applies a predicate to check if query has an edge assets with a given conditions (other predicates).
func (f *HPArtistFilter) WhereHasMembers()
WhereHasMembers applies a predicate to check if query has an edge members.
func (f *HPArtistFilter) WhereHasMembersWith(preds ...predicate.HPMember)
WhereHasMembersWith applies a predicate to check if query has an edge members with a given conditions (other predicates).
func (f *HPArtistFilter) WhereHasOwningAmebloPosts()
WhereHasOwningAmebloPosts applies a predicate to check if query has an edge owning_ameblo_posts.
func (f *HPArtistFilter) WhereHasOwningAmebloPostsWith(preds ...predicate.HPAmebloPost)
WhereHasOwningAmebloPostsWith applies a predicate to check if query has an edge owning_ameblo_posts with a given conditions (other predicates).
func (f *HPArtistFilter) WhereHasOwningFeed()
WhereHasOwningFeed applies a predicate to check if query has an edge owning_feed.
func (f *HPArtistFilter) WhereHasOwningFeedWith(preds ...predicate.HPFeedItem)
WhereHasOwningFeedWith applies a predicate to check if query has an edge owning_feed with a given conditions (other predicates).
func (f *HPArtistFilter) WhereHasOwningIgPosts()
WhereHasOwningIgPosts applies a predicate to check if query has an edge owning_ig_posts.
func (f *HPArtistFilter) WhereHasOwningIgPostsWith(preds ...predicate.HPIgPost)
WhereHasOwningIgPostsWith applies a predicate to check if query has an edge owning_ig_posts with a given conditions (other predicates).
func (f *HPArtistFilter) WhereHasTaggedAmebloPosts()
WhereHasTaggedAmebloPosts applies a predicate to check if query has an edge tagged_ameblo_posts.
func (f *HPArtistFilter) WhereHasTaggedAmebloPostsWith(preds ...predicate.HPAmebloPost)
WhereHasTaggedAmebloPostsWith applies a predicate to check if query has an edge tagged_ameblo_posts with a given conditions (other predicates).
func (f *HPArtistFilter) WhereHasTaggedElineupMallItems()
WhereHasTaggedElineupMallItems applies a predicate to check if query has an edge tagged_elineup_mall_items.
func (f *HPArtistFilter) WhereHasTaggedElineupMallItemsWith(preds ...predicate.HPElineupMallItem)
WhereHasTaggedElineupMallItemsWith applies a predicate to check if query has an edge tagged_elineup_mall_items with a given conditions (other predicates).
func (f *HPArtistFilter) WhereHasTaggedFeed()
WhereHasTaggedFeed applies a predicate to check if query has an edge tagged_feed.
func (f *HPArtistFilter) WhereHasTaggedFeedWith(preds ...predicate.HPFeedItem)
WhereHasTaggedFeedWith applies a predicate to check if query has an edge tagged_feed with a given conditions (other predicates).
func (f *HPArtistFilter) WhereHasTaggedIgPosts()
WhereHasTaggedIgPosts applies a predicate to check if query has an edge tagged_ig_posts.
func (f *HPArtistFilter) WhereHasTaggedIgPostsWith(preds ...predicate.HPIgPost)
WhereHasTaggedIgPostsWith applies a predicate to check if query has an edge tagged_ig_posts with a given conditions (other predicates).
func (f *HPArtistFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *HPArtistFilter) WhereIndex(p entql.IntP)
WhereIndex applies the entql int predicate on the index field.
func (f *HPArtistFilter) WhereKey(p entql.StringP)
WhereKey applies the entql string predicate on the key field.
func (f *HPArtistFilter) WhereLastErrorMessage(p entql.StringP)
WhereLastErrorMessage applies the entql string predicate on the last_error_message field.
func (f *HPArtistFilter) WhereManuallyModified(p entql.BytesP)
WhereManuallyModified applies the entql json.RawMessage predicate on the manually_modified field.
func (f *HPArtistFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
func (f *HPArtistFilter) WhereRecrawlRequired(p entql.BoolP)
WhereRecrawlRequired applies the entql bool predicate on the recrawl_required field.
func (f *HPArtistFilter) WhereThumbnailURL(p entql.StringP)
WhereThumbnailURL applies the entql string predicate on the thumbnail_url field.
func (f *HPArtistFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
HPArtistGroupBy is the group-by builder for HPArtist entities.
type HPArtistGroupBy struct {
// contains filtered or unexported fields
}
func (hagb *HPArtistGroupBy) Aggregate(fns ...AggregateFunc) *HPArtistGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *HPArtistGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPArtistGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPArtistGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPArtistGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPArtistGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPArtistGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPArtistGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPArtistGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPArtistGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPArtistGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPArtistGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPArtistGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hagb *HPArtistGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPArtistGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPArtistGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPArtistGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPArtistGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPArtistGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPArtistMutation represents an operation that mutates the HPArtist nodes in the graph.
type HPArtistMutation struct {
// contains filtered or unexported fields
}
func (m *HPArtistMutation) AddAssetIDs(ids ...int)
AddAssetIDs adds the "assets" edge to the HPAsset entity by ids.
func (m *HPArtistMutation) AddErrorCount(i int)
AddErrorCount adds i to the "error_count" field.
func (m *HPArtistMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPArtistMutation) AddIndex(i int)
AddIndex adds i to the "index" field.
func (m *HPArtistMutation) AddMemberIDs(ids ...int)
AddMemberIDs adds the "members" edge to the HPMember entity by ids.
func (m *HPArtistMutation) AddOwningAmebloPostIDs(ids ...int)
AddOwningAmebloPostIDs adds the "owning_ameblo_posts" edge to the HPAmebloPost entity by ids.
func (m *HPArtistMutation) AddOwningFeedIDs(ids ...int)
AddOwningFeedIDs adds the "owning_feed" edge to the HPFeedItem entity by ids.
func (m *HPArtistMutation) AddOwningIgPostIDs(ids ...int)
AddOwningIgPostIDs adds the "owning_ig_posts" edge to the HPIgPost entity by ids.
func (m *HPArtistMutation) AddTaggedAmebloPostIDs(ids ...int)
AddTaggedAmebloPostIDs adds the "tagged_ameblo_posts" edge to the HPAmebloPost entity by ids.
func (m *HPArtistMutation) AddTaggedElineupMallItemIDs(ids ...int)
AddTaggedElineupMallItemIDs adds the "tagged_elineup_mall_items" edge to the HPElineupMallItem entity by ids.
func (m *HPArtistMutation) AddTaggedFeedIDs(ids ...int)
AddTaggedFeedIDs adds the "tagged_feed" edge to the HPFeedItem entity by ids.
func (m *HPArtistMutation) AddTaggedIgPostIDs(ids ...int)
AddTaggedIgPostIDs adds the "tagged_ig_posts" edge to the HPIgPost entity by ids.
func (m *HPArtistMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *HPArtistMutation) AddedErrorCount() (r int, exists bool)
AddedErrorCount returns the value that was added to the "error_count" field in this mutation.
func (m *HPArtistMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPArtistMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *HPArtistMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *HPArtistMutation) AddedIndex() (r int, exists bool)
AddedIndex returns the value that was added to the "index" field in this mutation.
func (m *HPArtistMutation) AssetsCleared() bool
AssetsCleared reports if the "assets" edge to the HPAsset entity was cleared.
func (m *HPArtistMutation) AssetsIDs() (ids []int)
AssetsIDs returns the "assets" edge IDs in the mutation.
func (m *HPArtistMutation) ClearAssets()
ClearAssets clears the "assets" edge to the HPAsset entity.
func (m *HPArtistMutation) ClearCrawledAt()
ClearCrawledAt clears the value of the "crawled_at" field.
func (m *HPArtistMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (m *HPArtistMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *HPArtistMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPArtistMutation) ClearLastErrorMessage()
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (m *HPArtistMutation) ClearManuallyModified()
ClearManuallyModified clears the value of the "manually_modified" field.
func (m *HPArtistMutation) ClearMembers()
ClearMembers clears the "members" edge to the HPMember entity.
func (m *HPArtistMutation) ClearOwningAmebloPosts()
ClearOwningAmebloPosts clears the "owning_ameblo_posts" edge to the HPAmebloPost entity.
func (m *HPArtistMutation) ClearOwningFeed()
ClearOwningFeed clears the "owning_feed" edge to the HPFeedItem entity.
func (m *HPArtistMutation) ClearOwningIgPosts()
ClearOwningIgPosts clears the "owning_ig_posts" edge to the HPIgPost entity.
func (m *HPArtistMutation) ClearRecrawlRequired()
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (m *HPArtistMutation) ClearTaggedAmebloPosts()
ClearTaggedAmebloPosts clears the "tagged_ameblo_posts" edge to the HPAmebloPost entity.
func (m *HPArtistMutation) ClearTaggedElineupMallItems()
ClearTaggedElineupMallItems clears the "tagged_elineup_mall_items" edge to the HPElineupMallItem entity.
func (m *HPArtistMutation) ClearTaggedFeed()
ClearTaggedFeed clears the "tagged_feed" edge to the HPFeedItem entity.
func (m *HPArtistMutation) ClearTaggedIgPosts()
ClearTaggedIgPosts clears the "tagged_ig_posts" edge to the HPIgPost entity.
func (m *HPArtistMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (m *HPArtistMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *HPArtistMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m HPArtistMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *HPArtistMutation) CrawledAt() (r time.Time, exists bool)
CrawledAt returns the value of the "crawled_at" field in the mutation.
func (m *HPArtistMutation) CrawledAtCleared() bool
CrawledAtCleared returns if the "crawled_at" field was cleared in this mutation.
func (m *HPArtistMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (m *HPArtistMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (m *HPArtistMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *HPArtistMutation) ErrorCount() (r int, exists bool)
ErrorCount returns the value of the "error_count" field in the mutation.
func (m *HPArtistMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPArtistMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *HPArtistMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *HPArtistMutation) Filter() *HPArtistFilter
Filter returns an entql.Where implementation to apply filters on the HPArtistMutation builder.
func (m *HPArtistMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *HPArtistMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *HPArtistMutation) Index() (r int, exists bool)
Index returns the value of the "index" field in the mutation.
func (m *HPArtistMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (m *HPArtistMutation) LastErrorMessage() (r string, exists bool)
LastErrorMessage returns the value of the "last_error_message" field in the mutation.
func (m *HPArtistMutation) LastErrorMessageCleared() bool
LastErrorMessageCleared returns if the "last_error_message" field was cleared in this mutation.
func (m *HPArtistMutation) ManuallyModified() (r *jsonfields.ManuallyModified, exists bool)
ManuallyModified returns the value of the "manually_modified" field in the mutation.
func (m *HPArtistMutation) ManuallyModifiedCleared() bool
ManuallyModifiedCleared returns if the "manually_modified" field was cleared in this mutation.
func (m *HPArtistMutation) MembersCleared() bool
MembersCleared reports if the "members" edge to the HPMember entity was cleared.
func (m *HPArtistMutation) MembersIDs() (ids []int)
MembersIDs returns the "members" edge IDs in the mutation.
func (m *HPArtistMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (m *HPArtistMutation) OldCrawledAt(ctx context.Context) (v *time.Time, err error)
OldCrawledAt returns the old "crawled_at" field's value of the HPArtist entity. If the HPArtist object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPArtistMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
OldCreatedAt returns the old "created_at" field's value of the HPArtist entity. If the HPArtist object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPArtistMutation) OldErrorCount(ctx context.Context) (v int, err error)
OldErrorCount returns the old "error_count" field's value of the HPArtist entity. If the HPArtist object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPArtistMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *HPArtistMutation) OldIndex(ctx context.Context) (v int, err error)
OldIndex returns the old "index" field's value of the HPArtist entity. If the HPArtist object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPArtistMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the HPArtist entity. If the HPArtist object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPArtistMutation) OldLastErrorMessage(ctx context.Context) (v *string, err error)
OldLastErrorMessage returns the old "last_error_message" field's value of the HPArtist entity. If the HPArtist object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPArtistMutation) OldManuallyModified(ctx context.Context) (v *jsonfields.ManuallyModified, err error)
OldManuallyModified returns the old "manually_modified" field's value of the HPArtist entity. If the HPArtist object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPArtistMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the HPArtist entity. If the HPArtist object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPArtistMutation) OldRecrawlRequired(ctx context.Context) (v bool, err error)
OldRecrawlRequired returns the old "recrawl_required" field's value of the HPArtist entity. If the HPArtist object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPArtistMutation) OldThumbnailURL(ctx context.Context) (v string, err error)
OldThumbnailURL returns the old "thumbnail_url" field's value of the HPArtist entity. If the HPArtist object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPArtistMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
OldUpdatedAt returns the old "updated_at" field's value of the HPArtist entity. If the HPArtist object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPArtistMutation) Op() Op
Op returns the operation name.
func (m *HPArtistMutation) OwningAmebloPostsCleared() bool
OwningAmebloPostsCleared reports if the "owning_ameblo_posts" edge to the HPAmebloPost entity was cleared.
func (m *HPArtistMutation) OwningAmebloPostsIDs() (ids []int)
OwningAmebloPostsIDs returns the "owning_ameblo_posts" edge IDs in the mutation.
func (m *HPArtistMutation) OwningFeedCleared() bool
OwningFeedCleared reports if the "owning_feed" edge to the HPFeedItem entity was cleared.
func (m *HPArtistMutation) OwningFeedIDs() (ids []int)
OwningFeedIDs returns the "owning_feed" edge IDs in the mutation.
func (m *HPArtistMutation) OwningIgPostsCleared() bool
OwningIgPostsCleared reports if the "owning_ig_posts" edge to the HPIgPost entity was cleared.
func (m *HPArtistMutation) OwningIgPostsIDs() (ids []int)
OwningIgPostsIDs returns the "owning_ig_posts" edge IDs in the mutation.
func (m *HPArtistMutation) RecrawlRequired() (r bool, exists bool)
RecrawlRequired returns the value of the "recrawl_required" field in the mutation.
func (m *HPArtistMutation) RecrawlRequiredCleared() bool
RecrawlRequiredCleared returns if the "recrawl_required" field was cleared in this mutation.
func (m *HPArtistMutation) RemoveAssetIDs(ids ...int)
RemoveAssetIDs removes the "assets" edge to the HPAsset entity by IDs.
func (m *HPArtistMutation) RemoveMemberIDs(ids ...int)
RemoveMemberIDs removes the "members" edge to the HPMember entity by IDs.
func (m *HPArtistMutation) RemoveOwningAmebloPostIDs(ids ...int)
RemoveOwningAmebloPostIDs removes the "owning_ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (m *HPArtistMutation) RemoveOwningFeedIDs(ids ...int)
RemoveOwningFeedIDs removes the "owning_feed" edge to the HPFeedItem entity by IDs.
func (m *HPArtistMutation) RemoveOwningIgPostIDs(ids ...int)
RemoveOwningIgPostIDs removes the "owning_ig_posts" edge to the HPIgPost entity by IDs.
func (m *HPArtistMutation) RemoveTaggedAmebloPostIDs(ids ...int)
RemoveTaggedAmebloPostIDs removes the "tagged_ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (m *HPArtistMutation) RemoveTaggedElineupMallItemIDs(ids ...int)
RemoveTaggedElineupMallItemIDs removes the "tagged_elineup_mall_items" edge to the HPElineupMallItem entity by IDs.
func (m *HPArtistMutation) RemoveTaggedFeedIDs(ids ...int)
RemoveTaggedFeedIDs removes the "tagged_feed" edge to the HPFeedItem entity by IDs.
func (m *HPArtistMutation) RemoveTaggedIgPostIDs(ids ...int)
RemoveTaggedIgPostIDs removes the "tagged_ig_posts" edge to the HPIgPost entity by IDs.
func (m *HPArtistMutation) RemovedAssetsIDs() (ids []int)
RemovedAssets returns the removed IDs of the "assets" edge to the HPAsset entity.
func (m *HPArtistMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *HPArtistMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *HPArtistMutation) RemovedMembersIDs() (ids []int)
RemovedMembers returns the removed IDs of the "members" edge to the HPMember entity.
func (m *HPArtistMutation) RemovedOwningAmebloPostsIDs() (ids []int)
RemovedOwningAmebloPosts returns the removed IDs of the "owning_ameblo_posts" edge to the HPAmebloPost entity.
func (m *HPArtistMutation) RemovedOwningFeedIDs() (ids []int)
RemovedOwningFeed returns the removed IDs of the "owning_feed" edge to the HPFeedItem entity.
func (m *HPArtistMutation) RemovedOwningIgPostsIDs() (ids []int)
RemovedOwningIgPosts returns the removed IDs of the "owning_ig_posts" edge to the HPIgPost entity.
func (m *HPArtistMutation) RemovedTaggedAmebloPostsIDs() (ids []int)
RemovedTaggedAmebloPosts returns the removed IDs of the "tagged_ameblo_posts" edge to the HPAmebloPost entity.
func (m *HPArtistMutation) RemovedTaggedElineupMallItemsIDs() (ids []int)
RemovedTaggedElineupMallItems returns the removed IDs of the "tagged_elineup_mall_items" edge to the HPElineupMallItem entity.
func (m *HPArtistMutation) RemovedTaggedFeedIDs() (ids []int)
RemovedTaggedFeed returns the removed IDs of the "tagged_feed" edge to the HPFeedItem entity.
func (m *HPArtistMutation) RemovedTaggedIgPostsIDs() (ids []int)
RemovedTaggedIgPosts returns the removed IDs of the "tagged_ig_posts" edge to the HPIgPost entity.
func (m *HPArtistMutation) ResetAssets()
ResetAssets resets all changes to the "assets" edge.
func (m *HPArtistMutation) ResetCrawledAt()
ResetCrawledAt resets all changes to the "crawled_at" field.
func (m *HPArtistMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (m *HPArtistMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *HPArtistMutation) ResetErrorCount()
ResetErrorCount resets all changes to the "error_count" field.
func (m *HPArtistMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPArtistMutation) ResetIndex()
ResetIndex resets all changes to the "index" field.
func (m *HPArtistMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (m *HPArtistMutation) ResetLastErrorMessage()
ResetLastErrorMessage resets all changes to the "last_error_message" field.
func (m *HPArtistMutation) ResetManuallyModified()
ResetManuallyModified resets all changes to the "manually_modified" field.
func (m *HPArtistMutation) ResetMembers()
ResetMembers resets all changes to the "members" edge.
func (m *HPArtistMutation) ResetName()
ResetName resets all changes to the "name" field.
func (m *HPArtistMutation) ResetOwningAmebloPosts()
ResetOwningAmebloPosts resets all changes to the "owning_ameblo_posts" edge.
func (m *HPArtistMutation) ResetOwningFeed()
ResetOwningFeed resets all changes to the "owning_feed" edge.
func (m *HPArtistMutation) ResetOwningIgPosts()
ResetOwningIgPosts resets all changes to the "owning_ig_posts" edge.
func (m *HPArtistMutation) ResetRecrawlRequired()
ResetRecrawlRequired resets all changes to the "recrawl_required" field.
func (m *HPArtistMutation) ResetTaggedAmebloPosts()
ResetTaggedAmebloPosts resets all changes to the "tagged_ameblo_posts" edge.
func (m *HPArtistMutation) ResetTaggedElineupMallItems()
ResetTaggedElineupMallItems resets all changes to the "tagged_elineup_mall_items" edge.
func (m *HPArtistMutation) ResetTaggedFeed()
ResetTaggedFeed resets all changes to the "tagged_feed" edge.
func (m *HPArtistMutation) ResetTaggedIgPosts()
ResetTaggedIgPosts resets all changes to the "tagged_ig_posts" edge.
func (m *HPArtistMutation) ResetThumbnailURL()
ResetThumbnailURL resets all changes to the "thumbnail_url" field.
func (m *HPArtistMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (m *HPArtistMutation) SetCrawledAt(t time.Time)
SetCrawledAt sets the "crawled_at" field.
func (m *HPArtistMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (m *HPArtistMutation) SetErrorCount(i int)
SetErrorCount sets the "error_count" field.
func (m *HPArtistMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPArtistMutation) SetIndex(i int)
SetIndex sets the "index" field.
func (m *HPArtistMutation) SetKey(s string)
SetKey sets the "key" field.
func (m *HPArtistMutation) SetLastErrorMessage(s string)
SetLastErrorMessage sets the "last_error_message" field.
func (m *HPArtistMutation) SetManuallyModified(jm *jsonfields.ManuallyModified)
SetManuallyModified sets the "manually_modified" field.
func (m *HPArtistMutation) SetName(s string)
SetName sets the "name" field.
func (m *HPArtistMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *HPArtistMutation) SetRecrawlRequired(b bool)
SetRecrawlRequired sets the "recrawl_required" field.
func (m *HPArtistMutation) SetThumbnailURL(s string)
SetThumbnailURL sets the "thumbnail_url" field.
func (m *HPArtistMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (m *HPArtistMutation) TaggedAmebloPostsCleared() bool
TaggedAmebloPostsCleared reports if the "tagged_ameblo_posts" edge to the HPAmebloPost entity was cleared.
func (m *HPArtistMutation) TaggedAmebloPostsIDs() (ids []int)
TaggedAmebloPostsIDs returns the "tagged_ameblo_posts" edge IDs in the mutation.
func (m *HPArtistMutation) TaggedElineupMallItemsCleared() bool
TaggedElineupMallItemsCleared reports if the "tagged_elineup_mall_items" edge to the HPElineupMallItem entity was cleared.
func (m *HPArtistMutation) TaggedElineupMallItemsIDs() (ids []int)
TaggedElineupMallItemsIDs returns the "tagged_elineup_mall_items" edge IDs in the mutation.
func (m *HPArtistMutation) TaggedFeedCleared() bool
TaggedFeedCleared reports if the "tagged_feed" edge to the HPFeedItem entity was cleared.
func (m *HPArtistMutation) TaggedFeedIDs() (ids []int)
TaggedFeedIDs returns the "tagged_feed" edge IDs in the mutation.
func (m *HPArtistMutation) TaggedIgPostsCleared() bool
TaggedIgPostsCleared reports if the "tagged_ig_posts" edge to the HPIgPost entity was cleared.
func (m *HPArtistMutation) TaggedIgPostsIDs() (ids []int)
TaggedIgPostsIDs returns the "tagged_ig_posts" edge IDs in the mutation.
func (m *HPArtistMutation) ThumbnailURL() (r string, exists bool)
ThumbnailURL returns the value of the "thumbnail_url" field in the mutation.
func (m HPArtistMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *HPArtistMutation) Type() string
Type returns the node type of this mutation (HPArtist).
func (m *HPArtistMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (m *HPArtistMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (m *HPArtistMutation) Where(ps ...predicate.HPArtist)
Where appends a list predicates to the HPArtistMutation builder.
func (m *HPArtistMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HPArtistMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
HPArtistOrder defines the ordering of HPArtist.
type HPArtistOrder struct {
Direction OrderDirection `json:"direction"`
Field *HPArtistOrderField `json:"field"`
}
HPArtistOrderField defines the ordering field of HPArtist.
type HPArtistOrderField struct {
// contains filtered or unexported fields
}
HPArtistPaginateOption enables pagination customization.
type HPArtistPaginateOption func(*hpartistPager) error
func WithHPArtistFilter(filter func(*HPArtistQuery) (*HPArtistQuery, error)) HPArtistPaginateOption
WithHPArtistFilter configures pagination filter.
func WithHPArtistOrder(order *HPArtistOrder) HPArtistPaginateOption
WithHPArtistOrder configures pagination ordering.
HPArtistQuery is the builder for querying HPArtist entities.
type HPArtistQuery struct {
// contains filtered or unexported fields
}
func (haq *HPArtistQuery) Aggregate(fns ...AggregateFunc) *HPArtistSelect
Aggregate returns a HPArtistSelect configured with the given aggregations.
func (haq *HPArtistQuery) All(ctx context.Context) ([]*HPArtist, error)
All executes the query and returns a list of HPArtists.
func (haq *HPArtistQuery) AllX(ctx context.Context) []*HPArtist
AllX is like All, but panics if an error occurs.
func (haq *HPArtistQuery) Clone() *HPArtistQuery
Clone returns a duplicate of the HPArtistQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (ha *HPArtistQuery) CollectFields(ctx context.Context, satisfies ...string) (*HPArtistQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (haq *HPArtistQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (haq *HPArtistQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (haq *HPArtistQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (haq *HPArtistQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (haq *HPArtistQuery) Filter() *HPArtistFilter
Filter returns a Filter implementation to apply filters on the HPArtistQuery builder.
func (haq *HPArtistQuery) First(ctx context.Context) (*HPArtist, error)
First returns the first HPArtist entity from the query. Returns a *NotFoundError when no HPArtist was found.
func (haq *HPArtistQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first HPArtist ID from the query. Returns a *NotFoundError when no HPArtist ID was found.
func (haq *HPArtistQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (haq *HPArtistQuery) FirstX(ctx context.Context) *HPArtist
FirstX is like First, but panics if an error occurs.
func (haq *HPArtistQuery) GroupBy(field string, fields ...string) *HPArtistGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CrawledAt time.Time `json:"crawled_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.HPArtist.Query().
GroupBy(hpartist.FieldCrawledAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (haq *HPArtistQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of HPArtist IDs.
func (haq *HPArtistQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (haq *HPArtistQuery) Limit(limit int) *HPArtistQuery
Limit the number of records to be returned by this query.
func (haq *HPArtistQuery) Offset(offset int) *HPArtistQuery
Offset to start from.
func (haq *HPArtistQuery) Only(ctx context.Context) (*HPArtist, error)
Only returns a single HPArtist entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HPArtist entity is found. Returns a *NotFoundError when no HPArtist entities are found.
func (haq *HPArtistQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only HPArtist ID in the query. Returns a *NotSingularError when more than one HPArtist ID is found. Returns a *NotFoundError when no entities are found.
func (haq *HPArtistQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (haq *HPArtistQuery) OnlyX(ctx context.Context) *HPArtist
OnlyX is like Only, but panics if an error occurs.
func (haq *HPArtistQuery) Order(o ...hpartist.Order) *HPArtistQuery
Order specifies how the records should be ordered.
func (ha *HPArtistQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...HPArtistPaginateOption, ) (*HPArtistConnection, error)
Paginate executes the query and returns a relay based cursor connection to HPArtist.
func (haq *HPArtistQuery) QueryAssets() *HPAssetQuery
QueryAssets chains the current query on the "assets" edge.
func (haq *HPArtistQuery) QueryMembers() *HPMemberQuery
QueryMembers chains the current query on the "members" edge.
func (haq *HPArtistQuery) QueryOwningAmebloPosts() *HPAmebloPostQuery
QueryOwningAmebloPosts chains the current query on the "owning_ameblo_posts" edge.
func (haq *HPArtistQuery) QueryOwningFeed() *HPFeedItemQuery
QueryOwningFeed chains the current query on the "owning_feed" edge.
func (haq *HPArtistQuery) QueryOwningIgPosts() *HPIgPostQuery
QueryOwningIgPosts chains the current query on the "owning_ig_posts" edge.
func (haq *HPArtistQuery) QueryTaggedAmebloPosts() *HPAmebloPostQuery
QueryTaggedAmebloPosts chains the current query on the "tagged_ameblo_posts" edge.
func (haq *HPArtistQuery) QueryTaggedElineupMallItems() *HPElineupMallItemQuery
QueryTaggedElineupMallItems chains the current query on the "tagged_elineup_mall_items" edge.
func (haq *HPArtistQuery) QueryTaggedFeed() *HPFeedItemQuery
QueryTaggedFeed chains the current query on the "tagged_feed" edge.
func (haq *HPArtistQuery) QueryTaggedIgPosts() *HPIgPostQuery
QueryTaggedIgPosts chains the current query on the "tagged_ig_posts" edge.
func (haq *HPArtistQuery) Select(fields ...string) *HPArtistSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CrawledAt time.Time `json:"crawled_at,omitempty"`
}
client.HPArtist.Query().
Select(hpartist.FieldCrawledAt).
Scan(ctx, &v)
func (haq *HPArtistQuery) Unique(unique bool) *HPArtistQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (haq *HPArtistQuery) Where(ps ...predicate.HPArtist) *HPArtistQuery
Where adds a new predicate for the HPArtistQuery builder.
func (haq *HPArtistQuery) WithAssets(opts ...func(*HPAssetQuery)) *HPArtistQuery
WithAssets tells the query-builder to eager-load the nodes that are connected to the "assets" edge. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithMembers(opts ...func(*HPMemberQuery)) *HPArtistQuery
WithMembers tells the query-builder to eager-load the nodes that are connected to the "members" edge. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithNamedAssets(name string, opts ...func(*HPAssetQuery)) *HPArtistQuery
WithNamedAssets tells the query-builder to eager-load the nodes that are connected to the "assets" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithNamedMembers(name string, opts ...func(*HPMemberQuery)) *HPArtistQuery
WithNamedMembers tells the query-builder to eager-load the nodes that are connected to the "members" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithNamedOwningAmebloPosts(name string, opts ...func(*HPAmebloPostQuery)) *HPArtistQuery
WithNamedOwningAmebloPosts tells the query-builder to eager-load the nodes that are connected to the "owning_ameblo_posts" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithNamedOwningFeed(name string, opts ...func(*HPFeedItemQuery)) *HPArtistQuery
WithNamedOwningFeed tells the query-builder to eager-load the nodes that are connected to the "owning_feed" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithNamedOwningIgPosts(name string, opts ...func(*HPIgPostQuery)) *HPArtistQuery
WithNamedOwningIgPosts tells the query-builder to eager-load the nodes that are connected to the "owning_ig_posts" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithNamedTaggedAmebloPosts(name string, opts ...func(*HPAmebloPostQuery)) *HPArtistQuery
WithNamedTaggedAmebloPosts tells the query-builder to eager-load the nodes that are connected to the "tagged_ameblo_posts" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithNamedTaggedElineupMallItems(name string, opts ...func(*HPElineupMallItemQuery)) *HPArtistQuery
WithNamedTaggedElineupMallItems tells the query-builder to eager-load the nodes that are connected to the "tagged_elineup_mall_items" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithNamedTaggedFeed(name string, opts ...func(*HPFeedItemQuery)) *HPArtistQuery
WithNamedTaggedFeed tells the query-builder to eager-load the nodes that are connected to the "tagged_feed" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithNamedTaggedIgPosts(name string, opts ...func(*HPIgPostQuery)) *HPArtistQuery
WithNamedTaggedIgPosts tells the query-builder to eager-load the nodes that are connected to the "tagged_ig_posts" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithOwningAmebloPosts(opts ...func(*HPAmebloPostQuery)) *HPArtistQuery
WithOwningAmebloPosts tells the query-builder to eager-load the nodes that are connected to the "owning_ameblo_posts" edge. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithOwningFeed(opts ...func(*HPFeedItemQuery)) *HPArtistQuery
WithOwningFeed tells the query-builder to eager-load the nodes that are connected to the "owning_feed" edge. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithOwningIgPosts(opts ...func(*HPIgPostQuery)) *HPArtistQuery
WithOwningIgPosts tells the query-builder to eager-load the nodes that are connected to the "owning_ig_posts" edge. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithTaggedAmebloPosts(opts ...func(*HPAmebloPostQuery)) *HPArtistQuery
WithTaggedAmebloPosts tells the query-builder to eager-load the nodes that are connected to the "tagged_ameblo_posts" edge. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithTaggedElineupMallItems(opts ...func(*HPElineupMallItemQuery)) *HPArtistQuery
WithTaggedElineupMallItems tells the query-builder to eager-load the nodes that are connected to the "tagged_elineup_mall_items" edge. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithTaggedFeed(opts ...func(*HPFeedItemQuery)) *HPArtistQuery
WithTaggedFeed tells the query-builder to eager-load the nodes that are connected to the "tagged_feed" edge. The optional arguments are used to configure the query builder of the edge.
func (haq *HPArtistQuery) WithTaggedIgPosts(opts ...func(*HPIgPostQuery)) *HPArtistQuery
WithTaggedIgPosts tells the query-builder to eager-load the nodes that are connected to the "tagged_ig_posts" edge. The optional arguments are used to configure the query builder of the edge.
HPArtistSelect is the builder for selecting fields of HPArtist entities.
type HPArtistSelect struct {
*HPArtistQuery
// contains filtered or unexported fields
}
func (has *HPArtistSelect) Aggregate(fns ...AggregateFunc) *HPArtistSelect
Aggregate adds the given aggregation functions to the selector query.
func (s *HPArtistSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPArtistSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPArtistSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPArtistSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPArtistSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPArtistSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPArtistSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPArtistSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPArtistSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPArtistSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPArtistSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPArtistSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (has *HPArtistSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPArtistSelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPArtistSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPArtistSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPArtistSelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPArtistSelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPArtistUpdate is the builder for updating HPArtist entities.
type HPArtistUpdate struct {
// contains filtered or unexported fields
}
func (hau *HPArtistUpdate) AddAssetIDs(ids ...int) *HPArtistUpdate
AddAssetIDs adds the "assets" edge to the HPAsset entity by IDs.
func (hau *HPArtistUpdate) AddAssets(h ...*HPAsset) *HPArtistUpdate
AddAssets adds the "assets" edges to the HPAsset entity.
func (hau *HPArtistUpdate) AddErrorCount(i int) *HPArtistUpdate
AddErrorCount adds i to the "error_count" field.
func (hau *HPArtistUpdate) AddIndex(i int) *HPArtistUpdate
AddIndex adds i to the "index" field.
func (hau *HPArtistUpdate) AddMemberIDs(ids ...int) *HPArtistUpdate
AddMemberIDs adds the "members" edge to the HPMember entity by IDs.
func (hau *HPArtistUpdate) AddMembers(h ...*HPMember) *HPArtistUpdate
AddMembers adds the "members" edges to the HPMember entity.
func (hau *HPArtistUpdate) AddOwningAmebloPostIDs(ids ...int) *HPArtistUpdate
AddOwningAmebloPostIDs adds the "owning_ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hau *HPArtistUpdate) AddOwningAmebloPosts(h ...*HPAmebloPost) *HPArtistUpdate
AddOwningAmebloPosts adds the "owning_ameblo_posts" edges to the HPAmebloPost entity.
func (hau *HPArtistUpdate) AddOwningFeed(h ...*HPFeedItem) *HPArtistUpdate
AddOwningFeed adds the "owning_feed" edges to the HPFeedItem entity.
func (hau *HPArtistUpdate) AddOwningFeedIDs(ids ...int) *HPArtistUpdate
AddOwningFeedIDs adds the "owning_feed" edge to the HPFeedItem entity by IDs.
func (hau *HPArtistUpdate) AddOwningIgPostIDs(ids ...int) *HPArtistUpdate
AddOwningIgPostIDs adds the "owning_ig_posts" edge to the HPIgPost entity by IDs.
func (hau *HPArtistUpdate) AddOwningIgPosts(h ...*HPIgPost) *HPArtistUpdate
AddOwningIgPosts adds the "owning_ig_posts" edges to the HPIgPost entity.
func (hau *HPArtistUpdate) AddTaggedAmebloPostIDs(ids ...int) *HPArtistUpdate
AddTaggedAmebloPostIDs adds the "tagged_ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hau *HPArtistUpdate) AddTaggedAmebloPosts(h ...*HPAmebloPost) *HPArtistUpdate
AddTaggedAmebloPosts adds the "tagged_ameblo_posts" edges to the HPAmebloPost entity.
func (hau *HPArtistUpdate) AddTaggedElineupMallItemIDs(ids ...int) *HPArtistUpdate
AddTaggedElineupMallItemIDs adds the "tagged_elineup_mall_items" edge to the HPElineupMallItem entity by IDs.
func (hau *HPArtistUpdate) AddTaggedElineupMallItems(h ...*HPElineupMallItem) *HPArtistUpdate
AddTaggedElineupMallItems adds the "tagged_elineup_mall_items" edges to the HPElineupMallItem entity.
func (hau *HPArtistUpdate) AddTaggedFeed(h ...*HPFeedItem) *HPArtistUpdate
AddTaggedFeed adds the "tagged_feed" edges to the HPFeedItem entity.
func (hau *HPArtistUpdate) AddTaggedFeedIDs(ids ...int) *HPArtistUpdate
AddTaggedFeedIDs adds the "tagged_feed" edge to the HPFeedItem entity by IDs.
func (hau *HPArtistUpdate) AddTaggedIgPostIDs(ids ...int) *HPArtistUpdate
AddTaggedIgPostIDs adds the "tagged_ig_posts" edge to the HPIgPost entity by IDs.
func (hau *HPArtistUpdate) AddTaggedIgPosts(h ...*HPIgPost) *HPArtistUpdate
AddTaggedIgPosts adds the "tagged_ig_posts" edges to the HPIgPost entity.
func (hau *HPArtistUpdate) ClearAssets() *HPArtistUpdate
ClearAssets clears all "assets" edges to the HPAsset entity.
func (hau *HPArtistUpdate) ClearCrawledAt() *HPArtistUpdate
ClearCrawledAt clears the value of the "crawled_at" field.
func (hau *HPArtistUpdate) ClearLastErrorMessage() *HPArtistUpdate
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (hau *HPArtistUpdate) ClearManuallyModified() *HPArtistUpdate
ClearManuallyModified clears the value of the "manually_modified" field.
func (hau *HPArtistUpdate) ClearMembers() *HPArtistUpdate
ClearMembers clears all "members" edges to the HPMember entity.
func (hau *HPArtistUpdate) ClearOwningAmebloPosts() *HPArtistUpdate
ClearOwningAmebloPosts clears all "owning_ameblo_posts" edges to the HPAmebloPost entity.
func (hau *HPArtistUpdate) ClearOwningFeed() *HPArtistUpdate
ClearOwningFeed clears all "owning_feed" edges to the HPFeedItem entity.
func (hau *HPArtistUpdate) ClearOwningIgPosts() *HPArtistUpdate
ClearOwningIgPosts clears all "owning_ig_posts" edges to the HPIgPost entity.
func (hau *HPArtistUpdate) ClearRecrawlRequired() *HPArtistUpdate
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (hau *HPArtistUpdate) ClearTaggedAmebloPosts() *HPArtistUpdate
ClearTaggedAmebloPosts clears all "tagged_ameblo_posts" edges to the HPAmebloPost entity.
func (hau *HPArtistUpdate) ClearTaggedElineupMallItems() *HPArtistUpdate
ClearTaggedElineupMallItems clears all "tagged_elineup_mall_items" edges to the HPElineupMallItem entity.
func (hau *HPArtistUpdate) ClearTaggedFeed() *HPArtistUpdate
ClearTaggedFeed clears all "tagged_feed" edges to the HPFeedItem entity.
func (hau *HPArtistUpdate) ClearTaggedIgPosts() *HPArtistUpdate
ClearTaggedIgPosts clears all "tagged_ig_posts" edges to the HPIgPost entity.
func (hau *HPArtistUpdate) ClearUpdatedAt() *HPArtistUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (hau *HPArtistUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (hau *HPArtistUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hau *HPArtistUpdate) Mutation() *HPArtistMutation
Mutation returns the HPArtistMutation object of the builder.
func (hau *HPArtistUpdate) RemoveAssetIDs(ids ...int) *HPArtistUpdate
RemoveAssetIDs removes the "assets" edge to HPAsset entities by IDs.
func (hau *HPArtistUpdate) RemoveAssets(h ...*HPAsset) *HPArtistUpdate
RemoveAssets removes "assets" edges to HPAsset entities.
func (hau *HPArtistUpdate) RemoveMemberIDs(ids ...int) *HPArtistUpdate
RemoveMemberIDs removes the "members" edge to HPMember entities by IDs.
func (hau *HPArtistUpdate) RemoveMembers(h ...*HPMember) *HPArtistUpdate
RemoveMembers removes "members" edges to HPMember entities.
func (hau *HPArtistUpdate) RemoveOwningAmebloPostIDs(ids ...int) *HPArtistUpdate
RemoveOwningAmebloPostIDs removes the "owning_ameblo_posts" edge to HPAmebloPost entities by IDs.
func (hau *HPArtistUpdate) RemoveOwningAmebloPosts(h ...*HPAmebloPost) *HPArtistUpdate
RemoveOwningAmebloPosts removes "owning_ameblo_posts" edges to HPAmebloPost entities.
func (hau *HPArtistUpdate) RemoveOwningFeed(h ...*HPFeedItem) *HPArtistUpdate
RemoveOwningFeed removes "owning_feed" edges to HPFeedItem entities.
func (hau *HPArtistUpdate) RemoveOwningFeedIDs(ids ...int) *HPArtistUpdate
RemoveOwningFeedIDs removes the "owning_feed" edge to HPFeedItem entities by IDs.
func (hau *HPArtistUpdate) RemoveOwningIgPostIDs(ids ...int) *HPArtistUpdate
RemoveOwningIgPostIDs removes the "owning_ig_posts" edge to HPIgPost entities by IDs.
func (hau *HPArtistUpdate) RemoveOwningIgPosts(h ...*HPIgPost) *HPArtistUpdate
RemoveOwningIgPosts removes "owning_ig_posts" edges to HPIgPost entities.
func (hau *HPArtistUpdate) RemoveTaggedAmebloPostIDs(ids ...int) *HPArtistUpdate
RemoveTaggedAmebloPostIDs removes the "tagged_ameblo_posts" edge to HPAmebloPost entities by IDs.
func (hau *HPArtistUpdate) RemoveTaggedAmebloPosts(h ...*HPAmebloPost) *HPArtistUpdate
RemoveTaggedAmebloPosts removes "tagged_ameblo_posts" edges to HPAmebloPost entities.
func (hau *HPArtistUpdate) RemoveTaggedElineupMallItemIDs(ids ...int) *HPArtistUpdate
RemoveTaggedElineupMallItemIDs removes the "tagged_elineup_mall_items" edge to HPElineupMallItem entities by IDs.
func (hau *HPArtistUpdate) RemoveTaggedElineupMallItems(h ...*HPElineupMallItem) *HPArtistUpdate
RemoveTaggedElineupMallItems removes "tagged_elineup_mall_items" edges to HPElineupMallItem entities.
func (hau *HPArtistUpdate) RemoveTaggedFeed(h ...*HPFeedItem) *HPArtistUpdate
RemoveTaggedFeed removes "tagged_feed" edges to HPFeedItem entities.
func (hau *HPArtistUpdate) RemoveTaggedFeedIDs(ids ...int) *HPArtistUpdate
RemoveTaggedFeedIDs removes the "tagged_feed" edge to HPFeedItem entities by IDs.
func (hau *HPArtistUpdate) RemoveTaggedIgPostIDs(ids ...int) *HPArtistUpdate
RemoveTaggedIgPostIDs removes the "tagged_ig_posts" edge to HPIgPost entities by IDs.
func (hau *HPArtistUpdate) RemoveTaggedIgPosts(h ...*HPIgPost) *HPArtistUpdate
RemoveTaggedIgPosts removes "tagged_ig_posts" edges to HPIgPost entities.
func (hau *HPArtistUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (hau *HPArtistUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (hau *HPArtistUpdate) SetCrawledAt(t time.Time) *HPArtistUpdate
SetCrawledAt sets the "crawled_at" field.
func (hau *HPArtistUpdate) SetErrorCount(i int) *HPArtistUpdate
SetErrorCount sets the "error_count" field.
func (hau *HPArtistUpdate) SetIndex(i int) *HPArtistUpdate
SetIndex sets the "index" field.
func (hau *HPArtistUpdate) SetKey(s string) *HPArtistUpdate
SetKey sets the "key" field.
func (hau *HPArtistUpdate) SetLastErrorMessage(s string) *HPArtistUpdate
SetLastErrorMessage sets the "last_error_message" field.
func (hau *HPArtistUpdate) SetManuallyModified(jm *jsonfields.ManuallyModified) *HPArtistUpdate
SetManuallyModified sets the "manually_modified" field.
func (hau *HPArtistUpdate) SetName(s string) *HPArtistUpdate
SetName sets the "name" field.
func (hau *HPArtistUpdate) SetNillableCrawledAt(t *time.Time) *HPArtistUpdate
SetNillableCrawledAt sets the "crawled_at" field if the given value is not nil.
func (hau *HPArtistUpdate) SetNillableErrorCount(i *int) *HPArtistUpdate
SetNillableErrorCount sets the "error_count" field if the given value is not nil.
func (hau *HPArtistUpdate) SetNillableLastErrorMessage(s *string) *HPArtistUpdate
SetNillableLastErrorMessage sets the "last_error_message" field if the given value is not nil.
func (hau *HPArtistUpdate) SetNillableRecrawlRequired(b *bool) *HPArtistUpdate
SetNillableRecrawlRequired sets the "recrawl_required" field if the given value is not nil.
func (hau *HPArtistUpdate) SetNillableUpdatedAt(t *time.Time) *HPArtistUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hau *HPArtistUpdate) SetRecrawlRequired(b bool) *HPArtistUpdate
SetRecrawlRequired sets the "recrawl_required" field.
func (hau *HPArtistUpdate) SetThumbnailURL(s string) *HPArtistUpdate
SetThumbnailURL sets the "thumbnail_url" field.
func (hau *HPArtistUpdate) SetUpdatedAt(t time.Time) *HPArtistUpdate
SetUpdatedAt sets the "updated_at" field.
func (hau *HPArtistUpdate) Where(ps ...predicate.HPArtist) *HPArtistUpdate
Where appends a list predicates to the HPArtistUpdate builder.
HPArtistUpdateOne is the builder for updating a single HPArtist entity.
type HPArtistUpdateOne struct {
// contains filtered or unexported fields
}
func (hauo *HPArtistUpdateOne) AddAssetIDs(ids ...int) *HPArtistUpdateOne
AddAssetIDs adds the "assets" edge to the HPAsset entity by IDs.
func (hauo *HPArtistUpdateOne) AddAssets(h ...*HPAsset) *HPArtistUpdateOne
AddAssets adds the "assets" edges to the HPAsset entity.
func (hauo *HPArtistUpdateOne) AddErrorCount(i int) *HPArtistUpdateOne
AddErrorCount adds i to the "error_count" field.
func (hauo *HPArtistUpdateOne) AddIndex(i int) *HPArtistUpdateOne
AddIndex adds i to the "index" field.
func (hauo *HPArtistUpdateOne) AddMemberIDs(ids ...int) *HPArtistUpdateOne
AddMemberIDs adds the "members" edge to the HPMember entity by IDs.
func (hauo *HPArtistUpdateOne) AddMembers(h ...*HPMember) *HPArtistUpdateOne
AddMembers adds the "members" edges to the HPMember entity.
func (hauo *HPArtistUpdateOne) AddOwningAmebloPostIDs(ids ...int) *HPArtistUpdateOne
AddOwningAmebloPostIDs adds the "owning_ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hauo *HPArtistUpdateOne) AddOwningAmebloPosts(h ...*HPAmebloPost) *HPArtistUpdateOne
AddOwningAmebloPosts adds the "owning_ameblo_posts" edges to the HPAmebloPost entity.
func (hauo *HPArtistUpdateOne) AddOwningFeed(h ...*HPFeedItem) *HPArtistUpdateOne
AddOwningFeed adds the "owning_feed" edges to the HPFeedItem entity.
func (hauo *HPArtistUpdateOne) AddOwningFeedIDs(ids ...int) *HPArtistUpdateOne
AddOwningFeedIDs adds the "owning_feed" edge to the HPFeedItem entity by IDs.
func (hauo *HPArtistUpdateOne) AddOwningIgPostIDs(ids ...int) *HPArtistUpdateOne
AddOwningIgPostIDs adds the "owning_ig_posts" edge to the HPIgPost entity by IDs.
func (hauo *HPArtistUpdateOne) AddOwningIgPosts(h ...*HPIgPost) *HPArtistUpdateOne
AddOwningIgPosts adds the "owning_ig_posts" edges to the HPIgPost entity.
func (hauo *HPArtistUpdateOne) AddTaggedAmebloPostIDs(ids ...int) *HPArtistUpdateOne
AddTaggedAmebloPostIDs adds the "tagged_ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hauo *HPArtistUpdateOne) AddTaggedAmebloPosts(h ...*HPAmebloPost) *HPArtistUpdateOne
AddTaggedAmebloPosts adds the "tagged_ameblo_posts" edges to the HPAmebloPost entity.
func (hauo *HPArtistUpdateOne) AddTaggedElineupMallItemIDs(ids ...int) *HPArtistUpdateOne
AddTaggedElineupMallItemIDs adds the "tagged_elineup_mall_items" edge to the HPElineupMallItem entity by IDs.
func (hauo *HPArtistUpdateOne) AddTaggedElineupMallItems(h ...*HPElineupMallItem) *HPArtistUpdateOne
AddTaggedElineupMallItems adds the "tagged_elineup_mall_items" edges to the HPElineupMallItem entity.
func (hauo *HPArtistUpdateOne) AddTaggedFeed(h ...*HPFeedItem) *HPArtistUpdateOne
AddTaggedFeed adds the "tagged_feed" edges to the HPFeedItem entity.
func (hauo *HPArtistUpdateOne) AddTaggedFeedIDs(ids ...int) *HPArtistUpdateOne
AddTaggedFeedIDs adds the "tagged_feed" edge to the HPFeedItem entity by IDs.
func (hauo *HPArtistUpdateOne) AddTaggedIgPostIDs(ids ...int) *HPArtistUpdateOne
AddTaggedIgPostIDs adds the "tagged_ig_posts" edge to the HPIgPost entity by IDs.
func (hauo *HPArtistUpdateOne) AddTaggedIgPosts(h ...*HPIgPost) *HPArtistUpdateOne
AddTaggedIgPosts adds the "tagged_ig_posts" edges to the HPIgPost entity.
func (hauo *HPArtistUpdateOne) ClearAssets() *HPArtistUpdateOne
ClearAssets clears all "assets" edges to the HPAsset entity.
func (hauo *HPArtistUpdateOne) ClearCrawledAt() *HPArtistUpdateOne
ClearCrawledAt clears the value of the "crawled_at" field.
func (hauo *HPArtistUpdateOne) ClearLastErrorMessage() *HPArtistUpdateOne
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (hauo *HPArtistUpdateOne) ClearManuallyModified() *HPArtistUpdateOne
ClearManuallyModified clears the value of the "manually_modified" field.
func (hauo *HPArtistUpdateOne) ClearMembers() *HPArtistUpdateOne
ClearMembers clears all "members" edges to the HPMember entity.
func (hauo *HPArtistUpdateOne) ClearOwningAmebloPosts() *HPArtistUpdateOne
ClearOwningAmebloPosts clears all "owning_ameblo_posts" edges to the HPAmebloPost entity.
func (hauo *HPArtistUpdateOne) ClearOwningFeed() *HPArtistUpdateOne
ClearOwningFeed clears all "owning_feed" edges to the HPFeedItem entity.
func (hauo *HPArtistUpdateOne) ClearOwningIgPosts() *HPArtistUpdateOne
ClearOwningIgPosts clears all "owning_ig_posts" edges to the HPIgPost entity.
func (hauo *HPArtistUpdateOne) ClearRecrawlRequired() *HPArtistUpdateOne
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (hauo *HPArtistUpdateOne) ClearTaggedAmebloPosts() *HPArtistUpdateOne
ClearTaggedAmebloPosts clears all "tagged_ameblo_posts" edges to the HPAmebloPost entity.
func (hauo *HPArtistUpdateOne) ClearTaggedElineupMallItems() *HPArtistUpdateOne
ClearTaggedElineupMallItems clears all "tagged_elineup_mall_items" edges to the HPElineupMallItem entity.
func (hauo *HPArtistUpdateOne) ClearTaggedFeed() *HPArtistUpdateOne
ClearTaggedFeed clears all "tagged_feed" edges to the HPFeedItem entity.
func (hauo *HPArtistUpdateOne) ClearTaggedIgPosts() *HPArtistUpdateOne
ClearTaggedIgPosts clears all "tagged_ig_posts" edges to the HPIgPost entity.
func (hauo *HPArtistUpdateOne) ClearUpdatedAt() *HPArtistUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (hauo *HPArtistUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (hauo *HPArtistUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hauo *HPArtistUpdateOne) Mutation() *HPArtistMutation
Mutation returns the HPArtistMutation object of the builder.
func (hauo *HPArtistUpdateOne) RemoveAssetIDs(ids ...int) *HPArtistUpdateOne
RemoveAssetIDs removes the "assets" edge to HPAsset entities by IDs.
func (hauo *HPArtistUpdateOne) RemoveAssets(h ...*HPAsset) *HPArtistUpdateOne
RemoveAssets removes "assets" edges to HPAsset entities.
func (hauo *HPArtistUpdateOne) RemoveMemberIDs(ids ...int) *HPArtistUpdateOne
RemoveMemberIDs removes the "members" edge to HPMember entities by IDs.
func (hauo *HPArtistUpdateOne) RemoveMembers(h ...*HPMember) *HPArtistUpdateOne
RemoveMembers removes "members" edges to HPMember entities.
func (hauo *HPArtistUpdateOne) RemoveOwningAmebloPostIDs(ids ...int) *HPArtistUpdateOne
RemoveOwningAmebloPostIDs removes the "owning_ameblo_posts" edge to HPAmebloPost entities by IDs.
func (hauo *HPArtistUpdateOne) RemoveOwningAmebloPosts(h ...*HPAmebloPost) *HPArtistUpdateOne
RemoveOwningAmebloPosts removes "owning_ameblo_posts" edges to HPAmebloPost entities.
func (hauo *HPArtistUpdateOne) RemoveOwningFeed(h ...*HPFeedItem) *HPArtistUpdateOne
RemoveOwningFeed removes "owning_feed" edges to HPFeedItem entities.
func (hauo *HPArtistUpdateOne) RemoveOwningFeedIDs(ids ...int) *HPArtistUpdateOne
RemoveOwningFeedIDs removes the "owning_feed" edge to HPFeedItem entities by IDs.
func (hauo *HPArtistUpdateOne) RemoveOwningIgPostIDs(ids ...int) *HPArtistUpdateOne
RemoveOwningIgPostIDs removes the "owning_ig_posts" edge to HPIgPost entities by IDs.
func (hauo *HPArtistUpdateOne) RemoveOwningIgPosts(h ...*HPIgPost) *HPArtistUpdateOne
RemoveOwningIgPosts removes "owning_ig_posts" edges to HPIgPost entities.
func (hauo *HPArtistUpdateOne) RemoveTaggedAmebloPostIDs(ids ...int) *HPArtistUpdateOne
RemoveTaggedAmebloPostIDs removes the "tagged_ameblo_posts" edge to HPAmebloPost entities by IDs.
func (hauo *HPArtistUpdateOne) RemoveTaggedAmebloPosts(h ...*HPAmebloPost) *HPArtistUpdateOne
RemoveTaggedAmebloPosts removes "tagged_ameblo_posts" edges to HPAmebloPost entities.
func (hauo *HPArtistUpdateOne) RemoveTaggedElineupMallItemIDs(ids ...int) *HPArtistUpdateOne
RemoveTaggedElineupMallItemIDs removes the "tagged_elineup_mall_items" edge to HPElineupMallItem entities by IDs.
func (hauo *HPArtistUpdateOne) RemoveTaggedElineupMallItems(h ...*HPElineupMallItem) *HPArtistUpdateOne
RemoveTaggedElineupMallItems removes "tagged_elineup_mall_items" edges to HPElineupMallItem entities.
func (hauo *HPArtistUpdateOne) RemoveTaggedFeed(h ...*HPFeedItem) *HPArtistUpdateOne
RemoveTaggedFeed removes "tagged_feed" edges to HPFeedItem entities.
func (hauo *HPArtistUpdateOne) RemoveTaggedFeedIDs(ids ...int) *HPArtistUpdateOne
RemoveTaggedFeedIDs removes the "tagged_feed" edge to HPFeedItem entities by IDs.
func (hauo *HPArtistUpdateOne) RemoveTaggedIgPostIDs(ids ...int) *HPArtistUpdateOne
RemoveTaggedIgPostIDs removes the "tagged_ig_posts" edge to HPIgPost entities by IDs.
func (hauo *HPArtistUpdateOne) RemoveTaggedIgPosts(h ...*HPIgPost) *HPArtistUpdateOne
RemoveTaggedIgPosts removes "tagged_ig_posts" edges to HPIgPost entities.
func (hauo *HPArtistUpdateOne) Save(ctx context.Context) (*HPArtist, error)
Save executes the query and returns the updated HPArtist entity.
func (hauo *HPArtistUpdateOne) SaveX(ctx context.Context) *HPArtist
SaveX is like Save, but panics if an error occurs.
func (hauo *HPArtistUpdateOne) Select(field string, fields ...string) *HPArtistUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (hauo *HPArtistUpdateOne) SetCrawledAt(t time.Time) *HPArtistUpdateOne
SetCrawledAt sets the "crawled_at" field.
func (hauo *HPArtistUpdateOne) SetErrorCount(i int) *HPArtistUpdateOne
SetErrorCount sets the "error_count" field.
func (hauo *HPArtistUpdateOne) SetIndex(i int) *HPArtistUpdateOne
SetIndex sets the "index" field.
func (hauo *HPArtistUpdateOne) SetKey(s string) *HPArtistUpdateOne
SetKey sets the "key" field.
func (hauo *HPArtistUpdateOne) SetLastErrorMessage(s string) *HPArtistUpdateOne
SetLastErrorMessage sets the "last_error_message" field.
func (hauo *HPArtistUpdateOne) SetManuallyModified(jm *jsonfields.ManuallyModified) *HPArtistUpdateOne
SetManuallyModified sets the "manually_modified" field.
func (hauo *HPArtistUpdateOne) SetName(s string) *HPArtistUpdateOne
SetName sets the "name" field.
func (hauo *HPArtistUpdateOne) SetNillableCrawledAt(t *time.Time) *HPArtistUpdateOne
SetNillableCrawledAt sets the "crawled_at" field if the given value is not nil.
func (hauo *HPArtistUpdateOne) SetNillableErrorCount(i *int) *HPArtistUpdateOne
SetNillableErrorCount sets the "error_count" field if the given value is not nil.
func (hauo *HPArtistUpdateOne) SetNillableLastErrorMessage(s *string) *HPArtistUpdateOne
SetNillableLastErrorMessage sets the "last_error_message" field if the given value is not nil.
func (hauo *HPArtistUpdateOne) SetNillableRecrawlRequired(b *bool) *HPArtistUpdateOne
SetNillableRecrawlRequired sets the "recrawl_required" field if the given value is not nil.
func (hauo *HPArtistUpdateOne) SetNillableUpdatedAt(t *time.Time) *HPArtistUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hauo *HPArtistUpdateOne) SetRecrawlRequired(b bool) *HPArtistUpdateOne
SetRecrawlRequired sets the "recrawl_required" field.
func (hauo *HPArtistUpdateOne) SetThumbnailURL(s string) *HPArtistUpdateOne
SetThumbnailURL sets the "thumbnail_url" field.
func (hauo *HPArtistUpdateOne) SetUpdatedAt(t time.Time) *HPArtistUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (hauo *HPArtistUpdateOne) Where(ps ...predicate.HPArtist) *HPArtistUpdateOne
Where appends a list predicates to the HPArtistUpdate builder.
HPArtistUpsert is the "OnConflict" setter.
type HPArtistUpsert struct {
*sql.UpdateSet
}
func (u *HPArtistUpsert) AddErrorCount(v int) *HPArtistUpsert
AddErrorCount adds v to the "error_count" field.
func (u *HPArtistUpsert) AddIndex(v int) *HPArtistUpsert
AddIndex adds v to the "index" field.
func (u *HPArtistUpsert) ClearCrawledAt() *HPArtistUpsert
ClearCrawledAt clears the value of the "crawled_at" field.
func (u *HPArtistUpsert) ClearLastErrorMessage() *HPArtistUpsert
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (u *HPArtistUpsert) ClearManuallyModified() *HPArtistUpsert
ClearManuallyModified clears the value of the "manually_modified" field.
func (u *HPArtistUpsert) ClearRecrawlRequired() *HPArtistUpsert
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (u *HPArtistUpsert) ClearUpdatedAt() *HPArtistUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPArtistUpsert) SetCrawledAt(v time.Time) *HPArtistUpsert
SetCrawledAt sets the "crawled_at" field.
func (u *HPArtistUpsert) SetErrorCount(v int) *HPArtistUpsert
SetErrorCount sets the "error_count" field.
func (u *HPArtistUpsert) SetIndex(v int) *HPArtistUpsert
SetIndex sets the "index" field.
func (u *HPArtistUpsert) SetKey(v string) *HPArtistUpsert
SetKey sets the "key" field.
func (u *HPArtistUpsert) SetLastErrorMessage(v string) *HPArtistUpsert
SetLastErrorMessage sets the "last_error_message" field.
func (u *HPArtistUpsert) SetManuallyModified(v *jsonfields.ManuallyModified) *HPArtistUpsert
SetManuallyModified sets the "manually_modified" field.
func (u *HPArtistUpsert) SetName(v string) *HPArtistUpsert
SetName sets the "name" field.
func (u *HPArtistUpsert) SetRecrawlRequired(v bool) *HPArtistUpsert
SetRecrawlRequired sets the "recrawl_required" field.
func (u *HPArtistUpsert) SetThumbnailURL(v string) *HPArtistUpsert
SetThumbnailURL sets the "thumbnail_url" field.
func (u *HPArtistUpsert) SetUpdatedAt(v time.Time) *HPArtistUpsert
SetUpdatedAt sets the "updated_at" field.
func (u *HPArtistUpsert) UpdateCrawledAt() *HPArtistUpsert
UpdateCrawledAt sets the "crawled_at" field to the value that was provided on create.
func (u *HPArtistUpsert) UpdateErrorCount() *HPArtistUpsert
UpdateErrorCount sets the "error_count" field to the value that was provided on create.
func (u *HPArtistUpsert) UpdateIndex() *HPArtistUpsert
UpdateIndex sets the "index" field to the value that was provided on create.
func (u *HPArtistUpsert) UpdateKey() *HPArtistUpsert
UpdateKey sets the "key" field to the value that was provided on create.
func (u *HPArtistUpsert) UpdateLastErrorMessage() *HPArtistUpsert
UpdateLastErrorMessage sets the "last_error_message" field to the value that was provided on create.
func (u *HPArtistUpsert) UpdateManuallyModified() *HPArtistUpsert
UpdateManuallyModified sets the "manually_modified" field to the value that was provided on create.
func (u *HPArtistUpsert) UpdateName() *HPArtistUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (u *HPArtistUpsert) UpdateRecrawlRequired() *HPArtistUpsert
UpdateRecrawlRequired sets the "recrawl_required" field to the value that was provided on create.
func (u *HPArtistUpsert) UpdateThumbnailURL() *HPArtistUpsert
UpdateThumbnailURL sets the "thumbnail_url" field to the value that was provided on create.
func (u *HPArtistUpsert) UpdateUpdatedAt() *HPArtistUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPArtistUpsertBulk is the builder for "upsert"-ing a bulk of HPArtist nodes.
type HPArtistUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *HPArtistUpsertBulk) AddErrorCount(v int) *HPArtistUpsertBulk
AddErrorCount adds v to the "error_count" field.
func (u *HPArtistUpsertBulk) AddIndex(v int) *HPArtistUpsertBulk
AddIndex adds v to the "index" field.
func (u *HPArtistUpsertBulk) ClearCrawledAt() *HPArtistUpsertBulk
ClearCrawledAt clears the value of the "crawled_at" field.
func (u *HPArtistUpsertBulk) ClearLastErrorMessage() *HPArtistUpsertBulk
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (u *HPArtistUpsertBulk) ClearManuallyModified() *HPArtistUpsertBulk
ClearManuallyModified clears the value of the "manually_modified" field.
func (u *HPArtistUpsertBulk) ClearRecrawlRequired() *HPArtistUpsertBulk
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (u *HPArtistUpsertBulk) ClearUpdatedAt() *HPArtistUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPArtistUpsertBulk) DoNothing() *HPArtistUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPArtistUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPArtistUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPArtistUpsertBulk) Ignore() *HPArtistUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPArtist.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *HPArtistUpsertBulk) SetCrawledAt(v time.Time) *HPArtistUpsertBulk
SetCrawledAt sets the "crawled_at" field.
func (u *HPArtistUpsertBulk) SetErrorCount(v int) *HPArtistUpsertBulk
SetErrorCount sets the "error_count" field.
func (u *HPArtistUpsertBulk) SetIndex(v int) *HPArtistUpsertBulk
SetIndex sets the "index" field.
func (u *HPArtistUpsertBulk) SetKey(v string) *HPArtistUpsertBulk
SetKey sets the "key" field.
func (u *HPArtistUpsertBulk) SetLastErrorMessage(v string) *HPArtistUpsertBulk
SetLastErrorMessage sets the "last_error_message" field.
func (u *HPArtistUpsertBulk) SetManuallyModified(v *jsonfields.ManuallyModified) *HPArtistUpsertBulk
SetManuallyModified sets the "manually_modified" field.
func (u *HPArtistUpsertBulk) SetName(v string) *HPArtistUpsertBulk
SetName sets the "name" field.
func (u *HPArtistUpsertBulk) SetRecrawlRequired(v bool) *HPArtistUpsertBulk
SetRecrawlRequired sets the "recrawl_required" field.
func (u *HPArtistUpsertBulk) SetThumbnailURL(v string) *HPArtistUpsertBulk
SetThumbnailURL sets the "thumbnail_url" field.
func (u *HPArtistUpsertBulk) SetUpdatedAt(v time.Time) *HPArtistUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (u *HPArtistUpsertBulk) Update(set func(*HPArtistUpsert)) *HPArtistUpsertBulk
Update allows overriding fields `UPDATE` values. See the HPArtistCreateBulk.OnConflict documentation for more info.
func (u *HPArtistUpsertBulk) UpdateCrawledAt() *HPArtistUpsertBulk
UpdateCrawledAt sets the "crawled_at" field to the value that was provided on create.
func (u *HPArtistUpsertBulk) UpdateErrorCount() *HPArtistUpsertBulk
UpdateErrorCount sets the "error_count" field to the value that was provided on create.
func (u *HPArtistUpsertBulk) UpdateIndex() *HPArtistUpsertBulk
UpdateIndex sets the "index" field to the value that was provided on create.
func (u *HPArtistUpsertBulk) UpdateKey() *HPArtistUpsertBulk
UpdateKey sets the "key" field to the value that was provided on create.
func (u *HPArtistUpsertBulk) UpdateLastErrorMessage() *HPArtistUpsertBulk
UpdateLastErrorMessage sets the "last_error_message" field to the value that was provided on create.
func (u *HPArtistUpsertBulk) UpdateManuallyModified() *HPArtistUpsertBulk
UpdateManuallyModified sets the "manually_modified" field to the value that was provided on create.
func (u *HPArtistUpsertBulk) UpdateName() *HPArtistUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (u *HPArtistUpsertBulk) UpdateNewValues() *HPArtistUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPArtist.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPArtistUpsertBulk) UpdateRecrawlRequired() *HPArtistUpsertBulk
UpdateRecrawlRequired sets the "recrawl_required" field to the value that was provided on create.
func (u *HPArtistUpsertBulk) UpdateThumbnailURL() *HPArtistUpsertBulk
UpdateThumbnailURL sets the "thumbnail_url" field to the value that was provided on create.
func (u *HPArtistUpsertBulk) UpdateUpdatedAt() *HPArtistUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPArtistUpsertOne is the builder for "upsert"-ing
one HPArtist node.
type HPArtistUpsertOne struct {
// contains filtered or unexported fields
}
func (u *HPArtistUpsertOne) AddErrorCount(v int) *HPArtistUpsertOne
AddErrorCount adds v to the "error_count" field.
func (u *HPArtistUpsertOne) AddIndex(v int) *HPArtistUpsertOne
AddIndex adds v to the "index" field.
func (u *HPArtistUpsertOne) ClearCrawledAt() *HPArtistUpsertOne
ClearCrawledAt clears the value of the "crawled_at" field.
func (u *HPArtistUpsertOne) ClearLastErrorMessage() *HPArtistUpsertOne
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (u *HPArtistUpsertOne) ClearManuallyModified() *HPArtistUpsertOne
ClearManuallyModified clears the value of the "manually_modified" field.
func (u *HPArtistUpsertOne) ClearRecrawlRequired() *HPArtistUpsertOne
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (u *HPArtistUpsertOne) ClearUpdatedAt() *HPArtistUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPArtistUpsertOne) DoNothing() *HPArtistUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPArtistUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPArtistUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPArtistUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *HPArtistUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *HPArtistUpsertOne) Ignore() *HPArtistUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPArtist.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *HPArtistUpsertOne) SetCrawledAt(v time.Time) *HPArtistUpsertOne
SetCrawledAt sets the "crawled_at" field.
func (u *HPArtistUpsertOne) SetErrorCount(v int) *HPArtistUpsertOne
SetErrorCount sets the "error_count" field.
func (u *HPArtistUpsertOne) SetIndex(v int) *HPArtistUpsertOne
SetIndex sets the "index" field.
func (u *HPArtistUpsertOne) SetKey(v string) *HPArtistUpsertOne
SetKey sets the "key" field.
func (u *HPArtistUpsertOne) SetLastErrorMessage(v string) *HPArtistUpsertOne
SetLastErrorMessage sets the "last_error_message" field.
func (u *HPArtistUpsertOne) SetManuallyModified(v *jsonfields.ManuallyModified) *HPArtistUpsertOne
SetManuallyModified sets the "manually_modified" field.
func (u *HPArtistUpsertOne) SetName(v string) *HPArtistUpsertOne
SetName sets the "name" field.
func (u *HPArtistUpsertOne) SetRecrawlRequired(v bool) *HPArtistUpsertOne
SetRecrawlRequired sets the "recrawl_required" field.
func (u *HPArtistUpsertOne) SetThumbnailURL(v string) *HPArtistUpsertOne
SetThumbnailURL sets the "thumbnail_url" field.
func (u *HPArtistUpsertOne) SetUpdatedAt(v time.Time) *HPArtistUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (u *HPArtistUpsertOne) Update(set func(*HPArtistUpsert)) *HPArtistUpsertOne
Update allows overriding fields `UPDATE` values. See the HPArtistCreate.OnConflict documentation for more info.
func (u *HPArtistUpsertOne) UpdateCrawledAt() *HPArtistUpsertOne
UpdateCrawledAt sets the "crawled_at" field to the value that was provided on create.
func (u *HPArtistUpsertOne) UpdateErrorCount() *HPArtistUpsertOne
UpdateErrorCount sets the "error_count" field to the value that was provided on create.
func (u *HPArtistUpsertOne) UpdateIndex() *HPArtistUpsertOne
UpdateIndex sets the "index" field to the value that was provided on create.
func (u *HPArtistUpsertOne) UpdateKey() *HPArtistUpsertOne
UpdateKey sets the "key" field to the value that was provided on create.
func (u *HPArtistUpsertOne) UpdateLastErrorMessage() *HPArtistUpsertOne
UpdateLastErrorMessage sets the "last_error_message" field to the value that was provided on create.
func (u *HPArtistUpsertOne) UpdateManuallyModified() *HPArtistUpsertOne
UpdateManuallyModified sets the "manually_modified" field to the value that was provided on create.
func (u *HPArtistUpsertOne) UpdateName() *HPArtistUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (u *HPArtistUpsertOne) UpdateNewValues() *HPArtistUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPArtist.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPArtistUpsertOne) UpdateRecrawlRequired() *HPArtistUpsertOne
UpdateRecrawlRequired sets the "recrawl_required" field to the value that was provided on create.
func (u *HPArtistUpsertOne) UpdateThumbnailURL() *HPArtistUpsertOne
UpdateThumbnailURL sets the "thumbnail_url" field to the value that was provided on create.
func (u *HPArtistUpsertOne) UpdateUpdatedAt() *HPArtistUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPArtists is a parsable slice of HPArtist.
type HPArtists []*HPArtist
HPAsset is the model entity for the HPAsset schema.
type HPAsset struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Key holds the value of the "key" field.
Key string `json:"key,omitempty"`
// AssetType holds the value of the "asset_type" field.
AssetType enums.HPAssetType `json:"asset_type,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the HPAssetQuery when eager-loading is set.
Edges HPAssetEdges `json:"edges"`
// contains filtered or unexported fields
}
func (ha *HPAsset) NamedAmebloPosts(name string) ([]*HPAmebloPost, error)
NamedAmebloPosts returns the AmebloPosts named value or an error if the edge was not loaded in eager-loading with this name.
func (ha *HPAsset) NamedIgPosts(name string) ([]*HPIgPost, error)
NamedIgPosts returns the IgPosts named value or an error if the edge was not loaded in eager-loading with this name.
func (ha *HPAsset) NamedMembers(name string) ([]*HPMember, error)
NamedMembers returns the Members named value or an error if the edge was not loaded in eager-loading with this name.
func (ha *HPAsset) QueryAmebloPosts() *HPAmebloPostQuery
QueryAmebloPosts queries the "ameblo_posts" edge of the HPAsset entity.
func (ha *HPAsset) QueryArtist() *HPArtistQuery
QueryArtist queries the "artist" edge of the HPAsset entity.
func (ha *HPAsset) QueryIgPosts() *HPIgPostQuery
QueryIgPosts queries the "ig_posts" edge of the HPAsset entity.
func (ha *HPAsset) QueryMembers() *HPMemberQuery
QueryMembers queries the "members" edge of the HPAsset entity.
func (ha *HPAsset) String() string
String implements the fmt.Stringer.
func (ha *HPAsset) Unwrap() *HPAsset
Unwrap unwraps the HPAsset entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (ha *HPAsset) Update() *HPAssetUpdateOne
Update returns a builder for updating this HPAsset. Note that you need to call HPAsset.Unwrap() before calling this method if this HPAsset was returned from a transaction, and the transaction was committed or rolled back.
func (ha *HPAsset) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the HPAsset. This includes values selected through modifiers, order, etc.
HPAssetClient is a client for the HPAsset schema.
type HPAssetClient struct {
// contains filtered or unexported fields
}
func NewHPAssetClient(c config) *HPAssetClient
NewHPAssetClient returns a client for the HPAsset from the given config.
func (c *HPAssetClient) Create() *HPAssetCreate
Create returns a builder for creating a HPAsset entity.
func (c *HPAssetClient) CreateBulk(builders ...*HPAssetCreate) *HPAssetCreateBulk
CreateBulk returns a builder for creating a bulk of HPAsset entities.
func (c *HPAssetClient) Delete() *HPAssetDelete
Delete returns a delete builder for HPAsset.
func (c *HPAssetClient) DeleteOne(ha *HPAsset) *HPAssetDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *HPAssetClient) DeleteOneID(id int) *HPAssetDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *HPAssetClient) Get(ctx context.Context, id int) (*HPAsset, error)
Get returns a HPAsset entity by its id.
func (c *HPAssetClient) GetX(ctx context.Context, id int) *HPAsset
GetX is like Get, but panics if an error occurs.
func (c *HPAssetClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *HPAssetClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hpasset.Intercept(f(g(h())))`.
func (c *HPAssetClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *HPAssetClient) Query() *HPAssetQuery
Query returns a query builder for HPAsset.
func (c *HPAssetClient) QueryAmebloPosts(ha *HPAsset) *HPAmebloPostQuery
QueryAmebloPosts queries the ameblo_posts edge of a HPAsset.
func (c *HPAssetClient) QueryArtist(ha *HPAsset) *HPArtistQuery
QueryArtist queries the artist edge of a HPAsset.
func (c *HPAssetClient) QueryIgPosts(ha *HPAsset) *HPIgPostQuery
QueryIgPosts queries the ig_posts edge of a HPAsset.
func (c *HPAssetClient) QueryMembers(ha *HPAsset) *HPMemberQuery
QueryMembers queries the members edge of a HPAsset.
func (c *HPAssetClient) Update() *HPAssetUpdate
Update returns an update builder for HPAsset.
func (c *HPAssetClient) UpdateOne(ha *HPAsset) *HPAssetUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *HPAssetClient) UpdateOneID(id int) *HPAssetUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *HPAssetClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hpasset.Hooks(f(g(h())))`.
HPAssetCreate is the builder for creating a HPAsset entity.
type HPAssetCreate struct {
// contains filtered or unexported fields
}
func (hac *HPAssetCreate) AddAmebloPostIDs(ids ...int) *HPAssetCreate
AddAmebloPostIDs adds the "ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hac *HPAssetCreate) AddAmebloPosts(h ...*HPAmebloPost) *HPAssetCreate
AddAmebloPosts adds the "ameblo_posts" edges to the HPAmebloPost entity.
func (hac *HPAssetCreate) AddIgPostIDs(ids ...int) *HPAssetCreate
AddIgPostIDs adds the "ig_posts" edge to the HPIgPost entity by IDs.
func (hac *HPAssetCreate) AddIgPosts(h ...*HPIgPost) *HPAssetCreate
AddIgPosts adds the "ig_posts" edges to the HPIgPost entity.
func (hac *HPAssetCreate) AddMemberIDs(ids ...int) *HPAssetCreate
AddMemberIDs adds the "members" edge to the HPMember entity by IDs.
func (hac *HPAssetCreate) AddMembers(h ...*HPMember) *HPAssetCreate
AddMembers adds the "members" edges to the HPMember entity.
func (hac *HPAssetCreate) Exec(ctx context.Context) error
Exec executes the query.
func (hac *HPAssetCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hac *HPAssetCreate) Mutation() *HPAssetMutation
Mutation returns the HPAssetMutation object of the builder.
func (hac *HPAssetCreate) OnConflict(opts ...sql.ConflictOption) *HPAssetUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPAsset.Create().
SetKey(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPAssetUpsert) {
SetKey(v+v).
}).
Exec(ctx)
func (hac *HPAssetCreate) OnConflictColumns(columns ...string) *HPAssetUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPAsset.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hac *HPAssetCreate) Save(ctx context.Context) (*HPAsset, error)
Save creates the HPAsset in the database.
func (hac *HPAssetCreate) SaveX(ctx context.Context) *HPAsset
SaveX calls Save and panics if Save returns an error.
func (hac *HPAssetCreate) SetArtist(h *HPArtist) *HPAssetCreate
SetArtist sets the "artist" edge to the HPArtist entity.
func (hac *HPAssetCreate) SetArtistID(id int) *HPAssetCreate
SetArtistID sets the "artist" edge to the HPArtist entity by ID.
func (hac *HPAssetCreate) SetAssetType(eat enums.HPAssetType) *HPAssetCreate
SetAssetType sets the "asset_type" field.
func (hac *HPAssetCreate) SetKey(s string) *HPAssetCreate
SetKey sets the "key" field.
func (hac *HPAssetCreate) SetNillableArtistID(id *int) *HPAssetCreate
SetNillableArtistID sets the "artist" edge to the HPArtist entity by ID if the given value is not nil.
HPAssetCreateBulk is the builder for creating many HPAsset entities in bulk.
type HPAssetCreateBulk struct {
// contains filtered or unexported fields
}
func (hacb *HPAssetCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (hacb *HPAssetCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hacb *HPAssetCreateBulk) OnConflict(opts ...sql.ConflictOption) *HPAssetUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPAsset.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPAssetUpsert) {
SetKey(v+v).
}).
Exec(ctx)
func (hacb *HPAssetCreateBulk) OnConflictColumns(columns ...string) *HPAssetUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPAsset.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hacb *HPAssetCreateBulk) Save(ctx context.Context) ([]*HPAsset, error)
Save creates the HPAsset entities in the database.
func (hacb *HPAssetCreateBulk) SaveX(ctx context.Context) []*HPAsset
SaveX is like Save, but panics if an error occurs.
HPAssetDelete is the builder for deleting a HPAsset entity.
type HPAssetDelete struct {
// contains filtered or unexported fields
}
func (had *HPAssetDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (had *HPAssetDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (had *HPAssetDelete) Where(ps ...predicate.HPAsset) *HPAssetDelete
Where appends a list predicates to the HPAssetDelete builder.
HPAssetDeleteOne is the builder for deleting a single HPAsset entity.
type HPAssetDeleteOne struct {
// contains filtered or unexported fields
}
func (hado *HPAssetDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (hado *HPAssetDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hado *HPAssetDeleteOne) Where(ps ...predicate.HPAsset) *HPAssetDeleteOne
Where appends a list predicates to the HPAssetDelete builder.
HPAssetEdges holds the relations/edges for other nodes in the graph.
type HPAssetEdges struct {
// Artist holds the value of the artist edge.
Artist *HPArtist `json:"artist,omitempty"`
// Members holds the value of the members edge.
Members []*HPMember `json:"members,omitempty"`
// AmebloPosts holds the value of the ameblo_posts edge.
AmebloPosts []*HPAmebloPost `json:"ameblo_posts,omitempty"`
// IgPosts holds the value of the ig_posts edge.
IgPosts []*HPIgPost `json:"ig_posts,omitempty"`
// contains filtered or unexported fields
}
func (e HPAssetEdges) AmebloPostsOrErr() ([]*HPAmebloPost, error)
AmebloPostsOrErr returns the AmebloPosts value or an error if the edge was not loaded in eager-loading.
func (e HPAssetEdges) ArtistOrErr() (*HPArtist, error)
ArtistOrErr returns the Artist value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (e HPAssetEdges) IgPostsOrErr() ([]*HPIgPost, error)
IgPostsOrErr returns the IgPosts value or an error if the edge was not loaded in eager-loading.
func (e HPAssetEdges) MembersOrErr() ([]*HPMember, error)
MembersOrErr returns the Members value or an error if the edge was not loaded in eager-loading.
HPAssetFilter provides a generic filtering capability at runtime for HPAssetQuery.
type HPAssetFilter struct {
// contains filtered or unexported fields
}
func (f *HPAssetFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *HPAssetFilter) WhereAssetType(p entql.StringP)
WhereAssetType applies the entql string predicate on the asset_type field.
func (f *HPAssetFilter) WhereHasAmebloPosts()
WhereHasAmebloPosts applies a predicate to check if query has an edge ameblo_posts.
func (f *HPAssetFilter) WhereHasAmebloPostsWith(preds ...predicate.HPAmebloPost)
WhereHasAmebloPostsWith applies a predicate to check if query has an edge ameblo_posts with a given conditions (other predicates).
func (f *HPAssetFilter) WhereHasArtist()
WhereHasArtist applies a predicate to check if query has an edge artist.
func (f *HPAssetFilter) WhereHasArtistWith(preds ...predicate.HPArtist)
WhereHasArtistWith applies a predicate to check if query has an edge artist with a given conditions (other predicates).
func (f *HPAssetFilter) WhereHasIgPosts()
WhereHasIgPosts applies a predicate to check if query has an edge ig_posts.
func (f *HPAssetFilter) WhereHasIgPostsWith(preds ...predicate.HPIgPost)
WhereHasIgPostsWith applies a predicate to check if query has an edge ig_posts with a given conditions (other predicates).
func (f *HPAssetFilter) WhereHasMembers()
WhereHasMembers applies a predicate to check if query has an edge members.
func (f *HPAssetFilter) WhereHasMembersWith(preds ...predicate.HPMember)
WhereHasMembersWith applies a predicate to check if query has an edge members with a given conditions (other predicates).
func (f *HPAssetFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *HPAssetFilter) WhereKey(p entql.StringP)
WhereKey applies the entql string predicate on the key field.
HPAssetGroupBy is the group-by builder for HPAsset entities.
type HPAssetGroupBy struct {
// contains filtered or unexported fields
}
func (hagb *HPAssetGroupBy) Aggregate(fns ...AggregateFunc) *HPAssetGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *HPAssetGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPAssetGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPAssetGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPAssetGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPAssetGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPAssetGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPAssetGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPAssetGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPAssetGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPAssetGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPAssetGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPAssetGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hagb *HPAssetGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPAssetGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPAssetGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPAssetGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPAssetGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPAssetGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPAssetMutation represents an operation that mutates the HPAsset nodes in the graph.
type HPAssetMutation struct {
// contains filtered or unexported fields
}
func (m *HPAssetMutation) AddAmebloPostIDs(ids ...int)
AddAmebloPostIDs adds the "ameblo_posts" edge to the HPAmebloPost entity by ids.
func (m *HPAssetMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPAssetMutation) AddIgPostIDs(ids ...int)
AddIgPostIDs adds the "ig_posts" edge to the HPIgPost entity by ids.
func (m *HPAssetMutation) AddMemberIDs(ids ...int)
AddMemberIDs adds the "members" edge to the HPMember entity by ids.
func (m *HPAssetMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *HPAssetMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPAssetMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *HPAssetMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *HPAssetMutation) AmebloPostsCleared() bool
AmebloPostsCleared reports if the "ameblo_posts" edge to the HPAmebloPost entity was cleared.
func (m *HPAssetMutation) AmebloPostsIDs() (ids []int)
AmebloPostsIDs returns the "ameblo_posts" edge IDs in the mutation.
func (m *HPAssetMutation) ArtistCleared() bool
ArtistCleared reports if the "artist" edge to the HPArtist entity was cleared.
func (m *HPAssetMutation) ArtistID() (id int, exists bool)
ArtistID returns the "artist" edge ID in the mutation.
func (m *HPAssetMutation) ArtistIDs() (ids []int)
ArtistIDs returns the "artist" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ArtistID instead. It exists only for internal usage by the builders.
func (m *HPAssetMutation) AssetType() (r enums.HPAssetType, exists bool)
AssetType returns the value of the "asset_type" field in the mutation.
func (m *HPAssetMutation) ClearAmebloPosts()
ClearAmebloPosts clears the "ameblo_posts" edge to the HPAmebloPost entity.
func (m *HPAssetMutation) ClearArtist()
ClearArtist clears the "artist" edge to the HPArtist entity.
func (m *HPAssetMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *HPAssetMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPAssetMutation) ClearIgPosts()
ClearIgPosts clears the "ig_posts" edge to the HPIgPost entity.
func (m *HPAssetMutation) ClearMembers()
ClearMembers clears the "members" edge to the HPMember entity.
func (m *HPAssetMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *HPAssetMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m HPAssetMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *HPAssetMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *HPAssetMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPAssetMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *HPAssetMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *HPAssetMutation) Filter() *HPAssetFilter
Filter returns an entql.Where implementation to apply filters on the HPAssetMutation builder.
func (m *HPAssetMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *HPAssetMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *HPAssetMutation) IgPostsCleared() bool
IgPostsCleared reports if the "ig_posts" edge to the HPIgPost entity was cleared.
func (m *HPAssetMutation) IgPostsIDs() (ids []int)
IgPostsIDs returns the "ig_posts" edge IDs in the mutation.
func (m *HPAssetMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (m *HPAssetMutation) MembersCleared() bool
MembersCleared reports if the "members" edge to the HPMember entity was cleared.
func (m *HPAssetMutation) MembersIDs() (ids []int)
MembersIDs returns the "members" edge IDs in the mutation.
func (m *HPAssetMutation) OldAssetType(ctx context.Context) (v enums.HPAssetType, err error)
OldAssetType returns the old "asset_type" field's value of the HPAsset entity. If the HPAsset object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAssetMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *HPAssetMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the HPAsset entity. If the HPAsset object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPAssetMutation) Op() Op
Op returns the operation name.
func (m *HPAssetMutation) RemoveAmebloPostIDs(ids ...int)
RemoveAmebloPostIDs removes the "ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (m *HPAssetMutation) RemoveIgPostIDs(ids ...int)
RemoveIgPostIDs removes the "ig_posts" edge to the HPIgPost entity by IDs.
func (m *HPAssetMutation) RemoveMemberIDs(ids ...int)
RemoveMemberIDs removes the "members" edge to the HPMember entity by IDs.
func (m *HPAssetMutation) RemovedAmebloPostsIDs() (ids []int)
RemovedAmebloPosts returns the removed IDs of the "ameblo_posts" edge to the HPAmebloPost entity.
func (m *HPAssetMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *HPAssetMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *HPAssetMutation) RemovedIgPostsIDs() (ids []int)
RemovedIgPosts returns the removed IDs of the "ig_posts" edge to the HPIgPost entity.
func (m *HPAssetMutation) RemovedMembersIDs() (ids []int)
RemovedMembers returns the removed IDs of the "members" edge to the HPMember entity.
func (m *HPAssetMutation) ResetAmebloPosts()
ResetAmebloPosts resets all changes to the "ameblo_posts" edge.
func (m *HPAssetMutation) ResetArtist()
ResetArtist resets all changes to the "artist" edge.
func (m *HPAssetMutation) ResetAssetType()
ResetAssetType resets all changes to the "asset_type" field.
func (m *HPAssetMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *HPAssetMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPAssetMutation) ResetIgPosts()
ResetIgPosts resets all changes to the "ig_posts" edge.
func (m *HPAssetMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (m *HPAssetMutation) ResetMembers()
ResetMembers resets all changes to the "members" edge.
func (m *HPAssetMutation) SetArtistID(id int)
SetArtistID sets the "artist" edge to the HPArtist entity by id.
func (m *HPAssetMutation) SetAssetType(eat enums.HPAssetType)
SetAssetType sets the "asset_type" field.
func (m *HPAssetMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPAssetMutation) SetKey(s string)
SetKey sets the "key" field.
func (m *HPAssetMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m HPAssetMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *HPAssetMutation) Type() string
Type returns the node type of this mutation (HPAsset).
func (m *HPAssetMutation) Where(ps ...predicate.HPAsset)
Where appends a list predicates to the HPAssetMutation builder.
func (m *HPAssetMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HPAssetMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
HPAssetQuery is the builder for querying HPAsset entities.
type HPAssetQuery struct {
// contains filtered or unexported fields
}
func (haq *HPAssetQuery) Aggregate(fns ...AggregateFunc) *HPAssetSelect
Aggregate returns a HPAssetSelect configured with the given aggregations.
func (haq *HPAssetQuery) All(ctx context.Context) ([]*HPAsset, error)
All executes the query and returns a list of HPAssets.
func (haq *HPAssetQuery) AllX(ctx context.Context) []*HPAsset
AllX is like All, but panics if an error occurs.
func (haq *HPAssetQuery) Clone() *HPAssetQuery
Clone returns a duplicate of the HPAssetQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (haq *HPAssetQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (haq *HPAssetQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (haq *HPAssetQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (haq *HPAssetQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (haq *HPAssetQuery) Filter() *HPAssetFilter
Filter returns a Filter implementation to apply filters on the HPAssetQuery builder.
func (haq *HPAssetQuery) First(ctx context.Context) (*HPAsset, error)
First returns the first HPAsset entity from the query. Returns a *NotFoundError when no HPAsset was found.
func (haq *HPAssetQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first HPAsset ID from the query. Returns a *NotFoundError when no HPAsset ID was found.
func (haq *HPAssetQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (haq *HPAssetQuery) FirstX(ctx context.Context) *HPAsset
FirstX is like First, but panics if an error occurs.
func (haq *HPAssetQuery) GroupBy(field string, fields ...string) *HPAssetGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
Key string `json:"key,omitempty"`
Count int `json:"count,omitempty"`
}
client.HPAsset.Query().
GroupBy(hpasset.FieldKey).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (haq *HPAssetQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of HPAsset IDs.
func (haq *HPAssetQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (haq *HPAssetQuery) Limit(limit int) *HPAssetQuery
Limit the number of records to be returned by this query.
func (haq *HPAssetQuery) Offset(offset int) *HPAssetQuery
Offset to start from.
func (haq *HPAssetQuery) Only(ctx context.Context) (*HPAsset, error)
Only returns a single HPAsset entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HPAsset entity is found. Returns a *NotFoundError when no HPAsset entities are found.
func (haq *HPAssetQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only HPAsset ID in the query. Returns a *NotSingularError when more than one HPAsset ID is found. Returns a *NotFoundError when no entities are found.
func (haq *HPAssetQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (haq *HPAssetQuery) OnlyX(ctx context.Context) *HPAsset
OnlyX is like Only, but panics if an error occurs.
func (haq *HPAssetQuery) Order(o ...hpasset.Order) *HPAssetQuery
Order specifies how the records should be ordered.
func (haq *HPAssetQuery) QueryAmebloPosts() *HPAmebloPostQuery
QueryAmebloPosts chains the current query on the "ameblo_posts" edge.
func (haq *HPAssetQuery) QueryArtist() *HPArtistQuery
QueryArtist chains the current query on the "artist" edge.
func (haq *HPAssetQuery) QueryIgPosts() *HPIgPostQuery
QueryIgPosts chains the current query on the "ig_posts" edge.
func (haq *HPAssetQuery) QueryMembers() *HPMemberQuery
QueryMembers chains the current query on the "members" edge.
func (haq *HPAssetQuery) Select(fields ...string) *HPAssetSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
Key string `json:"key,omitempty"`
}
client.HPAsset.Query().
Select(hpasset.FieldKey).
Scan(ctx, &v)
func (haq *HPAssetQuery) Unique(unique bool) *HPAssetQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (haq *HPAssetQuery) Where(ps ...predicate.HPAsset) *HPAssetQuery
Where adds a new predicate for the HPAssetQuery builder.
func (haq *HPAssetQuery) WithAmebloPosts(opts ...func(*HPAmebloPostQuery)) *HPAssetQuery
WithAmebloPosts tells the query-builder to eager-load the nodes that are connected to the "ameblo_posts" edge. The optional arguments are used to configure the query builder of the edge.
func (haq *HPAssetQuery) WithArtist(opts ...func(*HPArtistQuery)) *HPAssetQuery
WithArtist tells the query-builder to eager-load the nodes that are connected to the "artist" edge. The optional arguments are used to configure the query builder of the edge.
func (haq *HPAssetQuery) WithIgPosts(opts ...func(*HPIgPostQuery)) *HPAssetQuery
WithIgPosts tells the query-builder to eager-load the nodes that are connected to the "ig_posts" edge. The optional arguments are used to configure the query builder of the edge.
func (haq *HPAssetQuery) WithMembers(opts ...func(*HPMemberQuery)) *HPAssetQuery
WithMembers tells the query-builder to eager-load the nodes that are connected to the "members" edge. The optional arguments are used to configure the query builder of the edge.
func (haq *HPAssetQuery) WithNamedAmebloPosts(name string, opts ...func(*HPAmebloPostQuery)) *HPAssetQuery
WithNamedAmebloPosts tells the query-builder to eager-load the nodes that are connected to the "ameblo_posts" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (haq *HPAssetQuery) WithNamedIgPosts(name string, opts ...func(*HPIgPostQuery)) *HPAssetQuery
WithNamedIgPosts tells the query-builder to eager-load the nodes that are connected to the "ig_posts" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (haq *HPAssetQuery) WithNamedMembers(name string, opts ...func(*HPMemberQuery)) *HPAssetQuery
WithNamedMembers tells the query-builder to eager-load the nodes that are connected to the "members" edge with the given name. The optional arguments are used to configure the query builder of the edge.
HPAssetSelect is the builder for selecting fields of HPAsset entities.
type HPAssetSelect struct {
*HPAssetQuery
// contains filtered or unexported fields
}
func (has *HPAssetSelect) Aggregate(fns ...AggregateFunc) *HPAssetSelect
Aggregate adds the given aggregation functions to the selector query.
func (s *HPAssetSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPAssetSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPAssetSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPAssetSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPAssetSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPAssetSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPAssetSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPAssetSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPAssetSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPAssetSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPAssetSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPAssetSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (has *HPAssetSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPAssetSelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPAssetSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPAssetSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPAssetSelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPAssetSelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPAssetUpdate is the builder for updating HPAsset entities.
type HPAssetUpdate struct {
// contains filtered or unexported fields
}
func (hau *HPAssetUpdate) AddAmebloPostIDs(ids ...int) *HPAssetUpdate
AddAmebloPostIDs adds the "ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hau *HPAssetUpdate) AddAmebloPosts(h ...*HPAmebloPost) *HPAssetUpdate
AddAmebloPosts adds the "ameblo_posts" edges to the HPAmebloPost entity.
func (hau *HPAssetUpdate) AddIgPostIDs(ids ...int) *HPAssetUpdate
AddIgPostIDs adds the "ig_posts" edge to the HPIgPost entity by IDs.
func (hau *HPAssetUpdate) AddIgPosts(h ...*HPIgPost) *HPAssetUpdate
AddIgPosts adds the "ig_posts" edges to the HPIgPost entity.
func (hau *HPAssetUpdate) AddMemberIDs(ids ...int) *HPAssetUpdate
AddMemberIDs adds the "members" edge to the HPMember entity by IDs.
func (hau *HPAssetUpdate) AddMembers(h ...*HPMember) *HPAssetUpdate
AddMembers adds the "members" edges to the HPMember entity.
func (hau *HPAssetUpdate) ClearAmebloPosts() *HPAssetUpdate
ClearAmebloPosts clears all "ameblo_posts" edges to the HPAmebloPost entity.
func (hau *HPAssetUpdate) ClearArtist() *HPAssetUpdate
ClearArtist clears the "artist" edge to the HPArtist entity.
func (hau *HPAssetUpdate) ClearIgPosts() *HPAssetUpdate
ClearIgPosts clears all "ig_posts" edges to the HPIgPost entity.
func (hau *HPAssetUpdate) ClearMembers() *HPAssetUpdate
ClearMembers clears all "members" edges to the HPMember entity.
func (hau *HPAssetUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (hau *HPAssetUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hau *HPAssetUpdate) Mutation() *HPAssetMutation
Mutation returns the HPAssetMutation object of the builder.
func (hau *HPAssetUpdate) RemoveAmebloPostIDs(ids ...int) *HPAssetUpdate
RemoveAmebloPostIDs removes the "ameblo_posts" edge to HPAmebloPost entities by IDs.
func (hau *HPAssetUpdate) RemoveAmebloPosts(h ...*HPAmebloPost) *HPAssetUpdate
RemoveAmebloPosts removes "ameblo_posts" edges to HPAmebloPost entities.
func (hau *HPAssetUpdate) RemoveIgPostIDs(ids ...int) *HPAssetUpdate
RemoveIgPostIDs removes the "ig_posts" edge to HPIgPost entities by IDs.
func (hau *HPAssetUpdate) RemoveIgPosts(h ...*HPIgPost) *HPAssetUpdate
RemoveIgPosts removes "ig_posts" edges to HPIgPost entities.
func (hau *HPAssetUpdate) RemoveMemberIDs(ids ...int) *HPAssetUpdate
RemoveMemberIDs removes the "members" edge to HPMember entities by IDs.
func (hau *HPAssetUpdate) RemoveMembers(h ...*HPMember) *HPAssetUpdate
RemoveMembers removes "members" edges to HPMember entities.
func (hau *HPAssetUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (hau *HPAssetUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (hau *HPAssetUpdate) SetArtist(h *HPArtist) *HPAssetUpdate
SetArtist sets the "artist" edge to the HPArtist entity.
func (hau *HPAssetUpdate) SetArtistID(id int) *HPAssetUpdate
SetArtistID sets the "artist" edge to the HPArtist entity by ID.
func (hau *HPAssetUpdate) SetAssetType(eat enums.HPAssetType) *HPAssetUpdate
SetAssetType sets the "asset_type" field.
func (hau *HPAssetUpdate) SetKey(s string) *HPAssetUpdate
SetKey sets the "key" field.
func (hau *HPAssetUpdate) SetNillableArtistID(id *int) *HPAssetUpdate
SetNillableArtistID sets the "artist" edge to the HPArtist entity by ID if the given value is not nil.
func (hau *HPAssetUpdate) Where(ps ...predicate.HPAsset) *HPAssetUpdate
Where appends a list predicates to the HPAssetUpdate builder.
HPAssetUpdateOne is the builder for updating a single HPAsset entity.
type HPAssetUpdateOne struct {
// contains filtered or unexported fields
}
func (hauo *HPAssetUpdateOne) AddAmebloPostIDs(ids ...int) *HPAssetUpdateOne
AddAmebloPostIDs adds the "ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hauo *HPAssetUpdateOne) AddAmebloPosts(h ...*HPAmebloPost) *HPAssetUpdateOne
AddAmebloPosts adds the "ameblo_posts" edges to the HPAmebloPost entity.
func (hauo *HPAssetUpdateOne) AddIgPostIDs(ids ...int) *HPAssetUpdateOne
AddIgPostIDs adds the "ig_posts" edge to the HPIgPost entity by IDs.
func (hauo *HPAssetUpdateOne) AddIgPosts(h ...*HPIgPost) *HPAssetUpdateOne
AddIgPosts adds the "ig_posts" edges to the HPIgPost entity.
func (hauo *HPAssetUpdateOne) AddMemberIDs(ids ...int) *HPAssetUpdateOne
AddMemberIDs adds the "members" edge to the HPMember entity by IDs.
func (hauo *HPAssetUpdateOne) AddMembers(h ...*HPMember) *HPAssetUpdateOne
AddMembers adds the "members" edges to the HPMember entity.
func (hauo *HPAssetUpdateOne) ClearAmebloPosts() *HPAssetUpdateOne
ClearAmebloPosts clears all "ameblo_posts" edges to the HPAmebloPost entity.
func (hauo *HPAssetUpdateOne) ClearArtist() *HPAssetUpdateOne
ClearArtist clears the "artist" edge to the HPArtist entity.
func (hauo *HPAssetUpdateOne) ClearIgPosts() *HPAssetUpdateOne
ClearIgPosts clears all "ig_posts" edges to the HPIgPost entity.
func (hauo *HPAssetUpdateOne) ClearMembers() *HPAssetUpdateOne
ClearMembers clears all "members" edges to the HPMember entity.
func (hauo *HPAssetUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (hauo *HPAssetUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hauo *HPAssetUpdateOne) Mutation() *HPAssetMutation
Mutation returns the HPAssetMutation object of the builder.
func (hauo *HPAssetUpdateOne) RemoveAmebloPostIDs(ids ...int) *HPAssetUpdateOne
RemoveAmebloPostIDs removes the "ameblo_posts" edge to HPAmebloPost entities by IDs.
func (hauo *HPAssetUpdateOne) RemoveAmebloPosts(h ...*HPAmebloPost) *HPAssetUpdateOne
RemoveAmebloPosts removes "ameblo_posts" edges to HPAmebloPost entities.
func (hauo *HPAssetUpdateOne) RemoveIgPostIDs(ids ...int) *HPAssetUpdateOne
RemoveIgPostIDs removes the "ig_posts" edge to HPIgPost entities by IDs.
func (hauo *HPAssetUpdateOne) RemoveIgPosts(h ...*HPIgPost) *HPAssetUpdateOne
RemoveIgPosts removes "ig_posts" edges to HPIgPost entities.
func (hauo *HPAssetUpdateOne) RemoveMemberIDs(ids ...int) *HPAssetUpdateOne
RemoveMemberIDs removes the "members" edge to HPMember entities by IDs.
func (hauo *HPAssetUpdateOne) RemoveMembers(h ...*HPMember) *HPAssetUpdateOne
RemoveMembers removes "members" edges to HPMember entities.
func (hauo *HPAssetUpdateOne) Save(ctx context.Context) (*HPAsset, error)
Save executes the query and returns the updated HPAsset entity.
func (hauo *HPAssetUpdateOne) SaveX(ctx context.Context) *HPAsset
SaveX is like Save, but panics if an error occurs.
func (hauo *HPAssetUpdateOne) Select(field string, fields ...string) *HPAssetUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (hauo *HPAssetUpdateOne) SetArtist(h *HPArtist) *HPAssetUpdateOne
SetArtist sets the "artist" edge to the HPArtist entity.
func (hauo *HPAssetUpdateOne) SetArtistID(id int) *HPAssetUpdateOne
SetArtistID sets the "artist" edge to the HPArtist entity by ID.
func (hauo *HPAssetUpdateOne) SetAssetType(eat enums.HPAssetType) *HPAssetUpdateOne
SetAssetType sets the "asset_type" field.
func (hauo *HPAssetUpdateOne) SetKey(s string) *HPAssetUpdateOne
SetKey sets the "key" field.
func (hauo *HPAssetUpdateOne) SetNillableArtistID(id *int) *HPAssetUpdateOne
SetNillableArtistID sets the "artist" edge to the HPArtist entity by ID if the given value is not nil.
func (hauo *HPAssetUpdateOne) Where(ps ...predicate.HPAsset) *HPAssetUpdateOne
Where appends a list predicates to the HPAssetUpdate builder.
HPAssetUpsert is the "OnConflict" setter.
type HPAssetUpsert struct {
*sql.UpdateSet
}
func (u *HPAssetUpsert) SetAssetType(v enums.HPAssetType) *HPAssetUpsert
SetAssetType sets the "asset_type" field.
func (u *HPAssetUpsert) SetKey(v string) *HPAssetUpsert
SetKey sets the "key" field.
func (u *HPAssetUpsert) UpdateAssetType() *HPAssetUpsert
UpdateAssetType sets the "asset_type" field to the value that was provided on create.
func (u *HPAssetUpsert) UpdateKey() *HPAssetUpsert
UpdateKey sets the "key" field to the value that was provided on create.
HPAssetUpsertBulk is the builder for "upsert"-ing a bulk of HPAsset nodes.
type HPAssetUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *HPAssetUpsertBulk) DoNothing() *HPAssetUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPAssetUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPAssetUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPAssetUpsertBulk) Ignore() *HPAssetUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPAsset.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *HPAssetUpsertBulk) SetAssetType(v enums.HPAssetType) *HPAssetUpsertBulk
SetAssetType sets the "asset_type" field.
func (u *HPAssetUpsertBulk) SetKey(v string) *HPAssetUpsertBulk
SetKey sets the "key" field.
func (u *HPAssetUpsertBulk) Update(set func(*HPAssetUpsert)) *HPAssetUpsertBulk
Update allows overriding fields `UPDATE` values. See the HPAssetCreateBulk.OnConflict documentation for more info.
func (u *HPAssetUpsertBulk) UpdateAssetType() *HPAssetUpsertBulk
UpdateAssetType sets the "asset_type" field to the value that was provided on create.
func (u *HPAssetUpsertBulk) UpdateKey() *HPAssetUpsertBulk
UpdateKey sets the "key" field to the value that was provided on create.
func (u *HPAssetUpsertBulk) UpdateNewValues() *HPAssetUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPAsset.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
HPAssetUpsertOne is the builder for "upsert"-ing
one HPAsset node.
type HPAssetUpsertOne struct {
// contains filtered or unexported fields
}
func (u *HPAssetUpsertOne) DoNothing() *HPAssetUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPAssetUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPAssetUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPAssetUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *HPAssetUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *HPAssetUpsertOne) Ignore() *HPAssetUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPAsset.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *HPAssetUpsertOne) SetAssetType(v enums.HPAssetType) *HPAssetUpsertOne
SetAssetType sets the "asset_type" field.
func (u *HPAssetUpsertOne) SetKey(v string) *HPAssetUpsertOne
SetKey sets the "key" field.
func (u *HPAssetUpsertOne) Update(set func(*HPAssetUpsert)) *HPAssetUpsertOne
Update allows overriding fields `UPDATE` values. See the HPAssetCreate.OnConflict documentation for more info.
func (u *HPAssetUpsertOne) UpdateAssetType() *HPAssetUpsertOne
UpdateAssetType sets the "asset_type" field to the value that was provided on create.
func (u *HPAssetUpsertOne) UpdateKey() *HPAssetUpsertOne
UpdateKey sets the "key" field to the value that was provided on create.
func (u *HPAssetUpsertOne) UpdateNewValues() *HPAssetUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPAsset.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
HPAssets is a parsable slice of HPAsset.
type HPAssets []*HPAsset
HPBlob is the model entity for the HPBlob schema.
type HPBlob struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// StoragePath holds the value of the "storage_path" field.
StoragePath string `json:"storage_path,omitempty"`
// SourceURL holds the value of the "source_url" field.
SourceURL string `json:"source_url,omitempty"`
// SourceHTMLURL holds the value of the "source_html_url" field.
SourceHTMLURL string `json:"source_html_url,omitempty"`
// Status holds the value of the "status" field.
Status enums.HPBlobStatus `json:"status,omitempty"`
// StatusMessage holds the value of the "status_message" field.
StatusMessage string `json:"status_message,omitempty"`
// StatusErrorCount holds the value of the "status_error_count" field.
StatusErrorCount int `json:"status_error_count,omitempty"`
// Type holds the value of the "type" field.
Type enums.HPBlobType `json:"type,omitempty"`
// SubType holds the value of the "sub_type" field.
SubType enums.HPBlobSubType `json:"sub_type,omitempty"`
// Width holds the value of the "width" field.
Width int `json:"width,omitempty"`
// Height holds the value of the "height" field.
Height int `json:"height,omitempty"`
// Size holds the value of the "size" field.
Size int64 `json:"size,omitempty"`
// OwnerArtistID holds the value of the "owner_artist_id" field.
OwnerArtistID int `json:"owner_artist_id,omitempty"`
// OwnerMemberID holds the value of the "owner_member_id" field.
OwnerMemberID int `json:"owner_member_id,omitempty"`
// NumFaces holds the value of the "num_faces" field.
NumFaces int `json:"num_faces,omitempty"`
// Faces holds the value of the "faces" field.
Faces jsonfields.HPBlobImageFace `json:"faces,omitempty"`
// FaceRecognitionStatus holds the value of the "face_recognition_status" field.
FaceRecognitionStatus enums.HPBlobFaceRecognitionStatus `json:"face_recognition_status,omitempty"`
// Thumbnail holds the value of the "thumbnail" field.
Thumbnail *jsonfields.HPBlobThumbnail `json:"thumbnail,omitempty"`
// DurationSeconds holds the value of the "duration_seconds" field.
DurationSeconds float64 `json:"duration_seconds,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the HPBlobQuery when eager-loading is set.
Edges HPBlobEdges `json:"edges"`
// contains filtered or unexported fields
}
func (hb *HPBlob) AmebloPosts(ctx context.Context) (result []*HPAmebloPost, err error)
func (hb *HPBlob) IgPosts(ctx context.Context) (result []*HPIgPost, err error)
func (n *HPBlob) IsNode()
IsNode implements the Node interface check for GQLGen.
func (hb *HPBlob) NamedAmebloPosts(name string) ([]*HPAmebloPost, error)
NamedAmebloPosts returns the AmebloPosts named value or an error if the edge was not loaded in eager-loading with this name.
func (hb *HPBlob) NamedIgPosts(name string) ([]*HPIgPost, error)
NamedIgPosts returns the IgPosts named value or an error if the edge was not loaded in eager-loading with this name.
func (hb *HPBlob) OwnerArtist(ctx context.Context) (*HPArtist, error)
func (hb *HPBlob) OwnerMember(ctx context.Context) (*HPMember, error)
func (hb *HPBlob) QueryAmebloPosts() *HPAmebloPostQuery
QueryAmebloPosts queries the "ameblo_posts" edge of the HPBlob entity.
func (hb *HPBlob) QueryIgPosts() *HPIgPostQuery
QueryIgPosts queries the "ig_posts" edge of the HPBlob entity.
func (hb *HPBlob) QueryOwnerArtist() *HPArtistQuery
QueryOwnerArtist queries the "owner_artist" edge of the HPBlob entity.
func (hb *HPBlob) QueryOwnerMember() *HPMemberQuery
QueryOwnerMember queries the "owner_member" edge of the HPBlob entity.
func (hb *HPBlob) String() string
String implements the fmt.Stringer.
func (hb *HPBlob) ToEdge(order *HPBlobOrder) *HPBlobEdge
ToEdge converts HPBlob into HPBlobEdge.
func (hb *HPBlob) Unwrap() *HPBlob
Unwrap unwraps the HPBlob entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (hb *HPBlob) Update() *HPBlobUpdateOne
Update returns a builder for updating this HPBlob. Note that you need to call HPBlob.Unwrap() before calling this method if this HPBlob was returned from a transaction, and the transaction was committed or rolled back.
func (hb *HPBlob) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the HPBlob. This includes values selected through modifiers, order, etc.
HPBlobClient is a client for the HPBlob schema.
type HPBlobClient struct {
// contains filtered or unexported fields
}
func NewHPBlobClient(c config) *HPBlobClient
NewHPBlobClient returns a client for the HPBlob from the given config.
func (c *HPBlobClient) Create() *HPBlobCreate
Create returns a builder for creating a HPBlob entity.
func (c *HPBlobClient) CreateBulk(builders ...*HPBlobCreate) *HPBlobCreateBulk
CreateBulk returns a builder for creating a bulk of HPBlob entities.
func (c *HPBlobClient) Delete() *HPBlobDelete
Delete returns a delete builder for HPBlob.
func (c *HPBlobClient) DeleteOne(hb *HPBlob) *HPBlobDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *HPBlobClient) DeleteOneID(id int) *HPBlobDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *HPBlobClient) Get(ctx context.Context, id int) (*HPBlob, error)
Get returns a HPBlob entity by its id.
func (c *HPBlobClient) GetX(ctx context.Context, id int) *HPBlob
GetX is like Get, but panics if an error occurs.
func (c *HPBlobClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *HPBlobClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hpblob.Intercept(f(g(h())))`.
func (c *HPBlobClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *HPBlobClient) Query() *HPBlobQuery
Query returns a query builder for HPBlob.
func (c *HPBlobClient) QueryAmebloPosts(hb *HPBlob) *HPAmebloPostQuery
QueryAmebloPosts queries the ameblo_posts edge of a HPBlob.
func (c *HPBlobClient) QueryIgPosts(hb *HPBlob) *HPIgPostQuery
QueryIgPosts queries the ig_posts edge of a HPBlob.
func (c *HPBlobClient) QueryOwnerArtist(hb *HPBlob) *HPArtistQuery
QueryOwnerArtist queries the owner_artist edge of a HPBlob.
func (c *HPBlobClient) QueryOwnerMember(hb *HPBlob) *HPMemberQuery
QueryOwnerMember queries the owner_member edge of a HPBlob.
func (c *HPBlobClient) Update() *HPBlobUpdate
Update returns an update builder for HPBlob.
func (c *HPBlobClient) UpdateOne(hb *HPBlob) *HPBlobUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *HPBlobClient) UpdateOneID(id int) *HPBlobUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *HPBlobClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hpblob.Hooks(f(g(h())))`.
HPBlobConnection is the connection containing edges to HPBlob.
type HPBlobConnection struct {
Edges []*HPBlobEdge `json:"edges"`
PageInfo PageInfo `json:"pageInfo"`
TotalCount int `json:"totalCount"`
}
HPBlobCreate is the builder for creating a HPBlob entity.
type HPBlobCreate struct {
// contains filtered or unexported fields
}
func (hbc *HPBlobCreate) AddAmebloPostIDs(ids ...int) *HPBlobCreate
AddAmebloPostIDs adds the "ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hbc *HPBlobCreate) AddAmebloPosts(h ...*HPAmebloPost) *HPBlobCreate
AddAmebloPosts adds the "ameblo_posts" edges to the HPAmebloPost entity.
func (hbc *HPBlobCreate) AddIgPostIDs(ids ...int) *HPBlobCreate
AddIgPostIDs adds the "ig_posts" edge to the HPIgPost entity by IDs.
func (hbc *HPBlobCreate) AddIgPosts(h ...*HPIgPost) *HPBlobCreate
AddIgPosts adds the "ig_posts" edges to the HPIgPost entity.
func (hbc *HPBlobCreate) Exec(ctx context.Context) error
Exec executes the query.
func (hbc *HPBlobCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hbc *HPBlobCreate) Mutation() *HPBlobMutation
Mutation returns the HPBlobMutation object of the builder.
func (hbc *HPBlobCreate) OnConflict(opts ...sql.ConflictOption) *HPBlobUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPBlob.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPBlobUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (hbc *HPBlobCreate) OnConflictColumns(columns ...string) *HPBlobUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPBlob.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hbc *HPBlobCreate) Save(ctx context.Context) (*HPBlob, error)
Save creates the HPBlob in the database.
func (hbc *HPBlobCreate) SaveX(ctx context.Context) *HPBlob
SaveX calls Save and panics if Save returns an error.
func (hbc *HPBlobCreate) SetCreatedAt(t time.Time) *HPBlobCreate
SetCreatedAt sets the "created_at" field.
func (hbc *HPBlobCreate) SetDurationSeconds(f float64) *HPBlobCreate
SetDurationSeconds sets the "duration_seconds" field.
func (hbc *HPBlobCreate) SetFaceRecognitionStatus(ebfrs enums.HPBlobFaceRecognitionStatus) *HPBlobCreate
SetFaceRecognitionStatus sets the "face_recognition_status" field.
func (hbc *HPBlobCreate) SetFaces(jbif jsonfields.HPBlobImageFace) *HPBlobCreate
SetFaces sets the "faces" field.
func (hbc *HPBlobCreate) SetHeight(i int) *HPBlobCreate
SetHeight sets the "height" field.
func (hbc *HPBlobCreate) SetNillableCreatedAt(t *time.Time) *HPBlobCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (hbc *HPBlobCreate) SetNillableDurationSeconds(f *float64) *HPBlobCreate
SetNillableDurationSeconds sets the "duration_seconds" field if the given value is not nil.
func (hbc *HPBlobCreate) SetNillableFaceRecognitionStatus(ebfrs *enums.HPBlobFaceRecognitionStatus) *HPBlobCreate
SetNillableFaceRecognitionStatus sets the "face_recognition_status" field if the given value is not nil.
func (hbc *HPBlobCreate) SetNillableFaces(jbif *jsonfields.HPBlobImageFace) *HPBlobCreate
SetNillableFaces sets the "faces" field if the given value is not nil.
func (hbc *HPBlobCreate) SetNillableHeight(i *int) *HPBlobCreate
SetNillableHeight sets the "height" field if the given value is not nil.
func (hbc *HPBlobCreate) SetNillableNumFaces(i *int) *HPBlobCreate
SetNillableNumFaces sets the "num_faces" field if the given value is not nil.
func (hbc *HPBlobCreate) SetNillableOwnerArtistID(i *int) *HPBlobCreate
SetNillableOwnerArtistID sets the "owner_artist_id" field if the given value is not nil.
func (hbc *HPBlobCreate) SetNillableOwnerMemberID(i *int) *HPBlobCreate
SetNillableOwnerMemberID sets the "owner_member_id" field if the given value is not nil.
func (hbc *HPBlobCreate) SetNillableSize(i *int64) *HPBlobCreate
SetNillableSize sets the "size" field if the given value is not nil.
func (hbc *HPBlobCreate) SetNillableStatusErrorCount(i *int) *HPBlobCreate
SetNillableStatusErrorCount sets the "status_error_count" field if the given value is not nil.
func (hbc *HPBlobCreate) SetNillableStatusMessage(s *string) *HPBlobCreate
SetNillableStatusMessage sets the "status_message" field if the given value is not nil.
func (hbc *HPBlobCreate) SetNillableUpdatedAt(t *time.Time) *HPBlobCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hbc *HPBlobCreate) SetNillableWidth(i *int) *HPBlobCreate
SetNillableWidth sets the "width" field if the given value is not nil.
func (hbc *HPBlobCreate) SetNumFaces(i int) *HPBlobCreate
SetNumFaces sets the "num_faces" field.
func (hbc *HPBlobCreate) SetOwnerArtist(h *HPArtist) *HPBlobCreate
SetOwnerArtist sets the "owner_artist" edge to the HPArtist entity.
func (hbc *HPBlobCreate) SetOwnerArtistID(i int) *HPBlobCreate
SetOwnerArtistID sets the "owner_artist_id" field.
func (hbc *HPBlobCreate) SetOwnerMember(h *HPMember) *HPBlobCreate
SetOwnerMember sets the "owner_member" edge to the HPMember entity.
func (hbc *HPBlobCreate) SetOwnerMemberID(i int) *HPBlobCreate
SetOwnerMemberID sets the "owner_member_id" field.
func (hbc *HPBlobCreate) SetSize(i int64) *HPBlobCreate
SetSize sets the "size" field.
func (hbc *HPBlobCreate) SetSourceHTMLURL(s string) *HPBlobCreate
SetSourceHTMLURL sets the "source_html_url" field.
func (hbc *HPBlobCreate) SetSourceURL(s string) *HPBlobCreate
SetSourceURL sets the "source_url" field.
func (hbc *HPBlobCreate) SetStatus(ebs enums.HPBlobStatus) *HPBlobCreate
SetStatus sets the "status" field.
func (hbc *HPBlobCreate) SetStatusErrorCount(i int) *HPBlobCreate
SetStatusErrorCount sets the "status_error_count" field.
func (hbc *HPBlobCreate) SetStatusMessage(s string) *HPBlobCreate
SetStatusMessage sets the "status_message" field.
func (hbc *HPBlobCreate) SetStoragePath(s string) *HPBlobCreate
SetStoragePath sets the "storage_path" field.
func (hbc *HPBlobCreate) SetSubType(ebst enums.HPBlobSubType) *HPBlobCreate
SetSubType sets the "sub_type" field.
func (hbc *HPBlobCreate) SetThumbnail(jbt *jsonfields.HPBlobThumbnail) *HPBlobCreate
SetThumbnail sets the "thumbnail" field.
func (hbc *HPBlobCreate) SetType(ebt enums.HPBlobType) *HPBlobCreate
SetType sets the "type" field.
func (hbc *HPBlobCreate) SetUpdatedAt(t time.Time) *HPBlobCreate
SetUpdatedAt sets the "updated_at" field.
func (hbc *HPBlobCreate) SetWidth(i int) *HPBlobCreate
SetWidth sets the "width" field.
HPBlobCreateBulk is the builder for creating many HPBlob entities in bulk.
type HPBlobCreateBulk struct {
// contains filtered or unexported fields
}
func (hbcb *HPBlobCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (hbcb *HPBlobCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hbcb *HPBlobCreateBulk) OnConflict(opts ...sql.ConflictOption) *HPBlobUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPBlob.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPBlobUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (hbcb *HPBlobCreateBulk) OnConflictColumns(columns ...string) *HPBlobUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPBlob.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hbcb *HPBlobCreateBulk) Save(ctx context.Context) ([]*HPBlob, error)
Save creates the HPBlob entities in the database.
func (hbcb *HPBlobCreateBulk) SaveX(ctx context.Context) []*HPBlob
SaveX is like Save, but panics if an error occurs.
HPBlobDelete is the builder for deleting a HPBlob entity.
type HPBlobDelete struct {
// contains filtered or unexported fields
}
func (hbd *HPBlobDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (hbd *HPBlobDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (hbd *HPBlobDelete) Where(ps ...predicate.HPBlob) *HPBlobDelete
Where appends a list predicates to the HPBlobDelete builder.
HPBlobDeleteOne is the builder for deleting a single HPBlob entity.
type HPBlobDeleteOne struct {
// contains filtered or unexported fields
}
func (hbdo *HPBlobDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (hbdo *HPBlobDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hbdo *HPBlobDeleteOne) Where(ps ...predicate.HPBlob) *HPBlobDeleteOne
Where appends a list predicates to the HPBlobDelete builder.
HPBlobEdge is the edge representation of HPBlob.
type HPBlobEdge struct {
Node *HPBlob `json:"node"`
Cursor Cursor `json:"cursor"`
}
HPBlobEdges holds the relations/edges for other nodes in the graph.
type HPBlobEdges struct {
// OwnerArtist holds the value of the owner_artist edge.
OwnerArtist *HPArtist `json:"owner_artist,omitempty"`
// OwnerMember holds the value of the owner_member edge.
OwnerMember *HPMember `json:"owner_member,omitempty"`
// AmebloPosts holds the value of the ameblo_posts edge.
AmebloPosts []*HPAmebloPost `json:"ameblo_posts,omitempty"`
// IgPosts holds the value of the ig_posts edge.
IgPosts []*HPIgPost `json:"ig_posts,omitempty"`
// contains filtered or unexported fields
}
func (e HPBlobEdges) AmebloPostsOrErr() ([]*HPAmebloPost, error)
AmebloPostsOrErr returns the AmebloPosts value or an error if the edge was not loaded in eager-loading.
func (e HPBlobEdges) IgPostsOrErr() ([]*HPIgPost, error)
IgPostsOrErr returns the IgPosts value or an error if the edge was not loaded in eager-loading.
func (e HPBlobEdges) OwnerArtistOrErr() (*HPArtist, error)
OwnerArtistOrErr returns the OwnerArtist value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (e HPBlobEdges) OwnerMemberOrErr() (*HPMember, error)
OwnerMemberOrErr returns the OwnerMember value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
HPBlobFilter provides a generic filtering capability at runtime for HPBlobQuery.
type HPBlobFilter struct {
// contains filtered or unexported fields
}
func (f *HPBlobFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *HPBlobFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (f *HPBlobFilter) WhereDurationSeconds(p entql.Float64P)
WhereDurationSeconds applies the entql float64 predicate on the duration_seconds field.
func (f *HPBlobFilter) WhereFaceRecognitionStatus(p entql.StringP)
WhereFaceRecognitionStatus applies the entql string predicate on the face_recognition_status field.
func (f *HPBlobFilter) WhereFaces(p entql.BytesP)
WhereFaces applies the entql json.RawMessage predicate on the faces field.
func (f *HPBlobFilter) WhereHasAmebloPosts()
WhereHasAmebloPosts applies a predicate to check if query has an edge ameblo_posts.
func (f *HPBlobFilter) WhereHasAmebloPostsWith(preds ...predicate.HPAmebloPost)
WhereHasAmebloPostsWith applies a predicate to check if query has an edge ameblo_posts with a given conditions (other predicates).
func (f *HPBlobFilter) WhereHasIgPosts()
WhereHasIgPosts applies a predicate to check if query has an edge ig_posts.
func (f *HPBlobFilter) WhereHasIgPostsWith(preds ...predicate.HPIgPost)
WhereHasIgPostsWith applies a predicate to check if query has an edge ig_posts with a given conditions (other predicates).
func (f *HPBlobFilter) WhereHasOwnerArtist()
WhereHasOwnerArtist applies a predicate to check if query has an edge owner_artist.
func (f *HPBlobFilter) WhereHasOwnerArtistWith(preds ...predicate.HPArtist)
WhereHasOwnerArtistWith applies a predicate to check if query has an edge owner_artist with a given conditions (other predicates).
func (f *HPBlobFilter) WhereHasOwnerMember()
WhereHasOwnerMember applies a predicate to check if query has an edge owner_member.
func (f *HPBlobFilter) WhereHasOwnerMemberWith(preds ...predicate.HPMember)
WhereHasOwnerMemberWith applies a predicate to check if query has an edge owner_member with a given conditions (other predicates).
func (f *HPBlobFilter) WhereHeight(p entql.IntP)
WhereHeight applies the entql int predicate on the height field.
func (f *HPBlobFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *HPBlobFilter) WhereNumFaces(p entql.IntP)
WhereNumFaces applies the entql int predicate on the num_faces field.
func (f *HPBlobFilter) WhereOwnerArtistID(p entql.IntP)
WhereOwnerArtistID applies the entql int predicate on the owner_artist_id field.
func (f *HPBlobFilter) WhereOwnerMemberID(p entql.IntP)
WhereOwnerMemberID applies the entql int predicate on the owner_member_id field.
func (f *HPBlobFilter) WhereSize(p entql.Int64P)
WhereSize applies the entql int64 predicate on the size field.
func (f *HPBlobFilter) WhereSourceHTMLURL(p entql.StringP)
WhereSourceHTMLURL applies the entql string predicate on the source_html_url field.
func (f *HPBlobFilter) WhereSourceURL(p entql.StringP)
WhereSourceURL applies the entql string predicate on the source_url field.
func (f *HPBlobFilter) WhereStatus(p entql.StringP)
WhereStatus applies the entql string predicate on the status field.
func (f *HPBlobFilter) WhereStatusErrorCount(p entql.IntP)
WhereStatusErrorCount applies the entql int predicate on the status_error_count field.
func (f *HPBlobFilter) WhereStatusMessage(p entql.StringP)
WhereStatusMessage applies the entql string predicate on the status_message field.
func (f *HPBlobFilter) WhereStoragePath(p entql.StringP)
WhereStoragePath applies the entql string predicate on the storage_path field.
func (f *HPBlobFilter) WhereSubType(p entql.StringP)
WhereSubType applies the entql string predicate on the sub_type field.
func (f *HPBlobFilter) WhereThumbnail(p entql.BytesP)
WhereThumbnail applies the entql json.RawMessage predicate on the thumbnail field.
func (f *HPBlobFilter) WhereType(p entql.StringP)
WhereType applies the entql string predicate on the type field.
func (f *HPBlobFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
func (f *HPBlobFilter) WhereWidth(p entql.IntP)
WhereWidth applies the entql int predicate on the width field.
HPBlobGroupBy is the group-by builder for HPBlob entities.
type HPBlobGroupBy struct {
// contains filtered or unexported fields
}
func (hbgb *HPBlobGroupBy) Aggregate(fns ...AggregateFunc) *HPBlobGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *HPBlobGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPBlobGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPBlobGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPBlobGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPBlobGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPBlobGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPBlobGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPBlobGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPBlobGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPBlobGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPBlobGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPBlobGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hbgb *HPBlobGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPBlobGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPBlobGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPBlobGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPBlobGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPBlobGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPBlobMutation represents an operation that mutates the HPBlob nodes in the graph.
type HPBlobMutation struct {
// contains filtered or unexported fields
}
func (m *HPBlobMutation) AddAmebloPostIDs(ids ...int)
AddAmebloPostIDs adds the "ameblo_posts" edge to the HPAmebloPost entity by ids.
func (m *HPBlobMutation) AddDurationSeconds(f float64)
AddDurationSeconds adds f to the "duration_seconds" field.
func (m *HPBlobMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPBlobMutation) AddHeight(i int)
AddHeight adds i to the "height" field.
func (m *HPBlobMutation) AddIgPostIDs(ids ...int)
AddIgPostIDs adds the "ig_posts" edge to the HPIgPost entity by ids.
func (m *HPBlobMutation) AddNumFaces(i int)
AddNumFaces adds i to the "num_faces" field.
func (m *HPBlobMutation) AddSize(i int64)
AddSize adds i to the "size" field.
func (m *HPBlobMutation) AddStatusErrorCount(i int)
AddStatusErrorCount adds i to the "status_error_count" field.
func (m *HPBlobMutation) AddWidth(i int)
AddWidth adds i to the "width" field.
func (m *HPBlobMutation) AddedDurationSeconds() (r float64, exists bool)
AddedDurationSeconds returns the value that was added to the "duration_seconds" field in this mutation.
func (m *HPBlobMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *HPBlobMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPBlobMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *HPBlobMutation) AddedHeight() (r int, exists bool)
AddedHeight returns the value that was added to the "height" field in this mutation.
func (m *HPBlobMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *HPBlobMutation) AddedNumFaces() (r int, exists bool)
AddedNumFaces returns the value that was added to the "num_faces" field in this mutation.
func (m *HPBlobMutation) AddedSize() (r int64, exists bool)
AddedSize returns the value that was added to the "size" field in this mutation.
func (m *HPBlobMutation) AddedStatusErrorCount() (r int, exists bool)
AddedStatusErrorCount returns the value that was added to the "status_error_count" field in this mutation.
func (m *HPBlobMutation) AddedWidth() (r int, exists bool)
AddedWidth returns the value that was added to the "width" field in this mutation.
func (m *HPBlobMutation) AmebloPostsCleared() bool
AmebloPostsCleared reports if the "ameblo_posts" edge to the HPAmebloPost entity was cleared.
func (m *HPBlobMutation) AmebloPostsIDs() (ids []int)
AmebloPostsIDs returns the "ameblo_posts" edge IDs in the mutation.
func (m *HPBlobMutation) ClearAmebloPosts()
ClearAmebloPosts clears the "ameblo_posts" edge to the HPAmebloPost entity.
func (m *HPBlobMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (m *HPBlobMutation) ClearDurationSeconds()
ClearDurationSeconds clears the value of the "duration_seconds" field.
func (m *HPBlobMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *HPBlobMutation) ClearFaceRecognitionStatus()
ClearFaceRecognitionStatus clears the value of the "face_recognition_status" field.
func (m *HPBlobMutation) ClearFaces()
ClearFaces clears the value of the "faces" field.
func (m *HPBlobMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPBlobMutation) ClearHeight()
ClearHeight clears the value of the "height" field.
func (m *HPBlobMutation) ClearIgPosts()
ClearIgPosts clears the "ig_posts" edge to the HPIgPost entity.
func (m *HPBlobMutation) ClearNumFaces()
ClearNumFaces clears the value of the "num_faces" field.
func (m *HPBlobMutation) ClearOwnerArtist()
ClearOwnerArtist clears the "owner_artist" edge to the HPArtist entity.
func (m *HPBlobMutation) ClearOwnerArtistID()
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (m *HPBlobMutation) ClearOwnerMember()
ClearOwnerMember clears the "owner_member" edge to the HPMember entity.
func (m *HPBlobMutation) ClearOwnerMemberID()
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (m *HPBlobMutation) ClearSize()
ClearSize clears the value of the "size" field.
func (m *HPBlobMutation) ClearStatusErrorCount()
ClearStatusErrorCount clears the value of the "status_error_count" field.
func (m *HPBlobMutation) ClearStatusMessage()
ClearStatusMessage clears the value of the "status_message" field.
func (m *HPBlobMutation) ClearThumbnail()
ClearThumbnail clears the value of the "thumbnail" field.
func (m *HPBlobMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (m *HPBlobMutation) ClearWidth()
ClearWidth clears the value of the "width" field.
func (m *HPBlobMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *HPBlobMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m HPBlobMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *HPBlobMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (m *HPBlobMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (m *HPBlobMutation) DurationSeconds() (r float64, exists bool)
DurationSeconds returns the value of the "duration_seconds" field in the mutation.
func (m *HPBlobMutation) DurationSecondsCleared() bool
DurationSecondsCleared returns if the "duration_seconds" field was cleared in this mutation.
func (m *HPBlobMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *HPBlobMutation) FaceRecognitionStatus() (r enums.HPBlobFaceRecognitionStatus, exists bool)
FaceRecognitionStatus returns the value of the "face_recognition_status" field in the mutation.
func (m *HPBlobMutation) FaceRecognitionStatusCleared() bool
FaceRecognitionStatusCleared returns if the "face_recognition_status" field was cleared in this mutation.
func (m *HPBlobMutation) Faces() (r jsonfields.HPBlobImageFace, exists bool)
Faces returns the value of the "faces" field in the mutation.
func (m *HPBlobMutation) FacesCleared() bool
FacesCleared returns if the "faces" field was cleared in this mutation.
func (m *HPBlobMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPBlobMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *HPBlobMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *HPBlobMutation) Filter() *HPBlobFilter
Filter returns an entql.Where implementation to apply filters on the HPBlobMutation builder.
func (m *HPBlobMutation) GetType() (r enums.HPBlobType, exists bool)
GetType returns the value of the "type" field in the mutation.
func (m *HPBlobMutation) Height() (r int, exists bool)
Height returns the value of the "height" field in the mutation.
func (m *HPBlobMutation) HeightCleared() bool
HeightCleared returns if the "height" field was cleared in this mutation.
func (m *HPBlobMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *HPBlobMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *HPBlobMutation) IgPostsCleared() bool
IgPostsCleared reports if the "ig_posts" edge to the HPIgPost entity was cleared.
func (m *HPBlobMutation) IgPostsIDs() (ids []int)
IgPostsIDs returns the "ig_posts" edge IDs in the mutation.
func (m *HPBlobMutation) NumFaces() (r int, exists bool)
NumFaces returns the value of the "num_faces" field in the mutation.
func (m *HPBlobMutation) NumFacesCleared() bool
NumFacesCleared returns if the "num_faces" field was cleared in this mutation.
func (m *HPBlobMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
OldCreatedAt returns the old "created_at" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldDurationSeconds(ctx context.Context) (v float64, err error)
OldDurationSeconds returns the old "duration_seconds" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldFaceRecognitionStatus(ctx context.Context) (v enums.HPBlobFaceRecognitionStatus, err error)
OldFaceRecognitionStatus returns the old "face_recognition_status" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldFaces(ctx context.Context) (v jsonfields.HPBlobImageFace, err error)
OldFaces returns the old "faces" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *HPBlobMutation) OldHeight(ctx context.Context) (v int, err error)
OldHeight returns the old "height" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldNumFaces(ctx context.Context) (v int, err error)
OldNumFaces returns the old "num_faces" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldOwnerArtistID(ctx context.Context) (v int, err error)
OldOwnerArtistID returns the old "owner_artist_id" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldOwnerMemberID(ctx context.Context) (v int, err error)
OldOwnerMemberID returns the old "owner_member_id" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldSize(ctx context.Context) (v int64, err error)
OldSize returns the old "size" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldSourceHTMLURL(ctx context.Context) (v string, err error)
OldSourceHTMLURL returns the old "source_html_url" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldSourceURL(ctx context.Context) (v string, err error)
OldSourceURL returns the old "source_url" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldStatus(ctx context.Context) (v enums.HPBlobStatus, err error)
OldStatus returns the old "status" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldStatusErrorCount(ctx context.Context) (v int, err error)
OldStatusErrorCount returns the old "status_error_count" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldStatusMessage(ctx context.Context) (v string, err error)
OldStatusMessage returns the old "status_message" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldStoragePath(ctx context.Context) (v string, err error)
OldStoragePath returns the old "storage_path" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldSubType(ctx context.Context) (v enums.HPBlobSubType, err error)
OldSubType returns the old "sub_type" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldThumbnail(ctx context.Context) (v *jsonfields.HPBlobThumbnail, err error)
OldThumbnail returns the old "thumbnail" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldType(ctx context.Context) (v enums.HPBlobType, err error)
OldType returns the old "type" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
OldUpdatedAt returns the old "updated_at" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) OldWidth(ctx context.Context) (v int, err error)
OldWidth returns the old "width" field's value of the HPBlob entity. If the HPBlob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPBlobMutation) Op() Op
Op returns the operation name.
func (m *HPBlobMutation) OwnerArtistCleared() bool
OwnerArtistCleared reports if the "owner_artist" edge to the HPArtist entity was cleared.
func (m *HPBlobMutation) OwnerArtistID() (r int, exists bool)
OwnerArtistID returns the value of the "owner_artist_id" field in the mutation.
func (m *HPBlobMutation) OwnerArtistIDCleared() bool
OwnerArtistIDCleared returns if the "owner_artist_id" field was cleared in this mutation.
func (m *HPBlobMutation) OwnerArtistIDs() (ids []int)
OwnerArtistIDs returns the "owner_artist" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerArtistID instead. It exists only for internal usage by the builders.
func (m *HPBlobMutation) OwnerMemberCleared() bool
OwnerMemberCleared reports if the "owner_member" edge to the HPMember entity was cleared.
func (m *HPBlobMutation) OwnerMemberID() (r int, exists bool)
OwnerMemberID returns the value of the "owner_member_id" field in the mutation.
func (m *HPBlobMutation) OwnerMemberIDCleared() bool
OwnerMemberIDCleared returns if the "owner_member_id" field was cleared in this mutation.
func (m *HPBlobMutation) OwnerMemberIDs() (ids []int)
OwnerMemberIDs returns the "owner_member" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerMemberID instead. It exists only for internal usage by the builders.
func (m *HPBlobMutation) RemoveAmebloPostIDs(ids ...int)
RemoveAmebloPostIDs removes the "ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (m *HPBlobMutation) RemoveIgPostIDs(ids ...int)
RemoveIgPostIDs removes the "ig_posts" edge to the HPIgPost entity by IDs.
func (m *HPBlobMutation) RemovedAmebloPostsIDs() (ids []int)
RemovedAmebloPosts returns the removed IDs of the "ameblo_posts" edge to the HPAmebloPost entity.
func (m *HPBlobMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *HPBlobMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *HPBlobMutation) RemovedIgPostsIDs() (ids []int)
RemovedIgPosts returns the removed IDs of the "ig_posts" edge to the HPIgPost entity.
func (m *HPBlobMutation) ResetAmebloPosts()
ResetAmebloPosts resets all changes to the "ameblo_posts" edge.
func (m *HPBlobMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (m *HPBlobMutation) ResetDurationSeconds()
ResetDurationSeconds resets all changes to the "duration_seconds" field.
func (m *HPBlobMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *HPBlobMutation) ResetFaceRecognitionStatus()
ResetFaceRecognitionStatus resets all changes to the "face_recognition_status" field.
func (m *HPBlobMutation) ResetFaces()
ResetFaces resets all changes to the "faces" field.
func (m *HPBlobMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPBlobMutation) ResetHeight()
ResetHeight resets all changes to the "height" field.
func (m *HPBlobMutation) ResetIgPosts()
ResetIgPosts resets all changes to the "ig_posts" edge.
func (m *HPBlobMutation) ResetNumFaces()
ResetNumFaces resets all changes to the "num_faces" field.
func (m *HPBlobMutation) ResetOwnerArtist()
ResetOwnerArtist resets all changes to the "owner_artist" edge.
func (m *HPBlobMutation) ResetOwnerArtistID()
ResetOwnerArtistID resets all changes to the "owner_artist_id" field.
func (m *HPBlobMutation) ResetOwnerMember()
ResetOwnerMember resets all changes to the "owner_member" edge.
func (m *HPBlobMutation) ResetOwnerMemberID()
ResetOwnerMemberID resets all changes to the "owner_member_id" field.
func (m *HPBlobMutation) ResetSize()
ResetSize resets all changes to the "size" field.
func (m *HPBlobMutation) ResetSourceHTMLURL()
ResetSourceHTMLURL resets all changes to the "source_html_url" field.
func (m *HPBlobMutation) ResetSourceURL()
ResetSourceURL resets all changes to the "source_url" field.
func (m *HPBlobMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (m *HPBlobMutation) ResetStatusErrorCount()
ResetStatusErrorCount resets all changes to the "status_error_count" field.
func (m *HPBlobMutation) ResetStatusMessage()
ResetStatusMessage resets all changes to the "status_message" field.
func (m *HPBlobMutation) ResetStoragePath()
ResetStoragePath resets all changes to the "storage_path" field.
func (m *HPBlobMutation) ResetSubType()
ResetSubType resets all changes to the "sub_type" field.
func (m *HPBlobMutation) ResetThumbnail()
ResetThumbnail resets all changes to the "thumbnail" field.
func (m *HPBlobMutation) ResetType()
ResetType resets all changes to the "type" field.
func (m *HPBlobMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (m *HPBlobMutation) ResetWidth()
ResetWidth resets all changes to the "width" field.
func (m *HPBlobMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (m *HPBlobMutation) SetDurationSeconds(f float64)
SetDurationSeconds sets the "duration_seconds" field.
func (m *HPBlobMutation) SetFaceRecognitionStatus(ebfrs enums.HPBlobFaceRecognitionStatus)
SetFaceRecognitionStatus sets the "face_recognition_status" field.
func (m *HPBlobMutation) SetFaces(jbif jsonfields.HPBlobImageFace)
SetFaces sets the "faces" field.
func (m *HPBlobMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPBlobMutation) SetHeight(i int)
SetHeight sets the "height" field.
func (m *HPBlobMutation) SetNumFaces(i int)
SetNumFaces sets the "num_faces" field.
func (m *HPBlobMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *HPBlobMutation) SetOwnerArtistID(i int)
SetOwnerArtistID sets the "owner_artist_id" field.
func (m *HPBlobMutation) SetOwnerMemberID(i int)
SetOwnerMemberID sets the "owner_member_id" field.
func (m *HPBlobMutation) SetSize(i int64)
SetSize sets the "size" field.
func (m *HPBlobMutation) SetSourceHTMLURL(s string)
SetSourceHTMLURL sets the "source_html_url" field.
func (m *HPBlobMutation) SetSourceURL(s string)
SetSourceURL sets the "source_url" field.
func (m *HPBlobMutation) SetStatus(ebs enums.HPBlobStatus)
SetStatus sets the "status" field.
func (m *HPBlobMutation) SetStatusErrorCount(i int)
SetStatusErrorCount sets the "status_error_count" field.
func (m *HPBlobMutation) SetStatusMessage(s string)
SetStatusMessage sets the "status_message" field.
func (m *HPBlobMutation) SetStoragePath(s string)
SetStoragePath sets the "storage_path" field.
func (m *HPBlobMutation) SetSubType(ebst enums.HPBlobSubType)
SetSubType sets the "sub_type" field.
func (m *HPBlobMutation) SetThumbnail(jbt *jsonfields.HPBlobThumbnail)
SetThumbnail sets the "thumbnail" field.
func (m *HPBlobMutation) SetType(ebt enums.HPBlobType)
SetType sets the "type" field.
func (m *HPBlobMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (m *HPBlobMutation) SetWidth(i int)
SetWidth sets the "width" field.
func (m *HPBlobMutation) Size() (r int64, exists bool)
Size returns the value of the "size" field in the mutation.
func (m *HPBlobMutation) SizeCleared() bool
SizeCleared returns if the "size" field was cleared in this mutation.
func (m *HPBlobMutation) SourceHTMLURL() (r string, exists bool)
SourceHTMLURL returns the value of the "source_html_url" field in the mutation.
func (m *HPBlobMutation) SourceURL() (r string, exists bool)
SourceURL returns the value of the "source_url" field in the mutation.
func (m *HPBlobMutation) Status() (r enums.HPBlobStatus, exists bool)
Status returns the value of the "status" field in the mutation.
func (m *HPBlobMutation) StatusErrorCount() (r int, exists bool)
StatusErrorCount returns the value of the "status_error_count" field in the mutation.
func (m *HPBlobMutation) StatusErrorCountCleared() bool
StatusErrorCountCleared returns if the "status_error_count" field was cleared in this mutation.
func (m *HPBlobMutation) StatusMessage() (r string, exists bool)
StatusMessage returns the value of the "status_message" field in the mutation.
func (m *HPBlobMutation) StatusMessageCleared() bool
StatusMessageCleared returns if the "status_message" field was cleared in this mutation.
func (m *HPBlobMutation) StoragePath() (r string, exists bool)
StoragePath returns the value of the "storage_path" field in the mutation.
func (m *HPBlobMutation) SubType() (r enums.HPBlobSubType, exists bool)
SubType returns the value of the "sub_type" field in the mutation.
func (m *HPBlobMutation) Thumbnail() (r *jsonfields.HPBlobThumbnail, exists bool)
Thumbnail returns the value of the "thumbnail" field in the mutation.
func (m *HPBlobMutation) ThumbnailCleared() bool
ThumbnailCleared returns if the "thumbnail" field was cleared in this mutation.
func (m HPBlobMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *HPBlobMutation) Type() string
Type returns the node type of this mutation (HPBlob).
func (m *HPBlobMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (m *HPBlobMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (m *HPBlobMutation) Where(ps ...predicate.HPBlob)
Where appends a list predicates to the HPBlobMutation builder.
func (m *HPBlobMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HPBlobMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (m *HPBlobMutation) Width() (r int, exists bool)
Width returns the value of the "width" field in the mutation.
func (m *HPBlobMutation) WidthCleared() bool
WidthCleared returns if the "width" field was cleared in this mutation.
HPBlobOrder defines the ordering of HPBlob.
type HPBlobOrder struct {
Direction OrderDirection `json:"direction"`
Field *HPBlobOrderField `json:"field"`
}
HPBlobOrderField defines the ordering field of HPBlob.
type HPBlobOrderField struct {
// contains filtered or unexported fields
}
HPBlobPaginateOption enables pagination customization.
type HPBlobPaginateOption func(*hpblobPager) error
func WithHPBlobFilter(filter func(*HPBlobQuery) (*HPBlobQuery, error)) HPBlobPaginateOption
WithHPBlobFilter configures pagination filter.
func WithHPBlobOrder(order *HPBlobOrder) HPBlobPaginateOption
WithHPBlobOrder configures pagination ordering.
HPBlobQuery is the builder for querying HPBlob entities.
type HPBlobQuery struct {
// contains filtered or unexported fields
}
func (hbq *HPBlobQuery) Aggregate(fns ...AggregateFunc) *HPBlobSelect
Aggregate returns a HPBlobSelect configured with the given aggregations.
func (hbq *HPBlobQuery) All(ctx context.Context) ([]*HPBlob, error)
All executes the query and returns a list of HPBlobs.
func (hbq *HPBlobQuery) AllX(ctx context.Context) []*HPBlob
AllX is like All, but panics if an error occurs.
func (hbq *HPBlobQuery) Clone() *HPBlobQuery
Clone returns a duplicate of the HPBlobQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (hb *HPBlobQuery) CollectFields(ctx context.Context, satisfies ...string) (*HPBlobQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (hbq *HPBlobQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (hbq *HPBlobQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (hbq *HPBlobQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (hbq *HPBlobQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (hbq *HPBlobQuery) Filter() *HPBlobFilter
Filter returns a Filter implementation to apply filters on the HPBlobQuery builder.
func (hbq *HPBlobQuery) First(ctx context.Context) (*HPBlob, error)
First returns the first HPBlob entity from the query. Returns a *NotFoundError when no HPBlob was found.
func (hbq *HPBlobQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first HPBlob ID from the query. Returns a *NotFoundError when no HPBlob ID was found.
func (hbq *HPBlobQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (hbq *HPBlobQuery) FirstX(ctx context.Context) *HPBlob
FirstX is like First, but panics if an error occurs.
func (hbq *HPBlobQuery) GroupBy(field string, fields ...string) *HPBlobGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.HPBlob.Query().
GroupBy(hpblob.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (hbq *HPBlobQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of HPBlob IDs.
func (hbq *HPBlobQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (hbq *HPBlobQuery) Limit(limit int) *HPBlobQuery
Limit the number of records to be returned by this query.
func (hbq *HPBlobQuery) Offset(offset int) *HPBlobQuery
Offset to start from.
func (hbq *HPBlobQuery) Only(ctx context.Context) (*HPBlob, error)
Only returns a single HPBlob entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HPBlob entity is found. Returns a *NotFoundError when no HPBlob entities are found.
func (hbq *HPBlobQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only HPBlob ID in the query. Returns a *NotSingularError when more than one HPBlob ID is found. Returns a *NotFoundError when no entities are found.
func (hbq *HPBlobQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (hbq *HPBlobQuery) OnlyX(ctx context.Context) *HPBlob
OnlyX is like Only, but panics if an error occurs.
func (hbq *HPBlobQuery) Order(o ...hpblob.Order) *HPBlobQuery
Order specifies how the records should be ordered.
func (hb *HPBlobQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...HPBlobPaginateOption, ) (*HPBlobConnection, error)
Paginate executes the query and returns a relay based cursor connection to HPBlob.
func (hbq *HPBlobQuery) QueryAmebloPosts() *HPAmebloPostQuery
QueryAmebloPosts chains the current query on the "ameblo_posts" edge.
func (hbq *HPBlobQuery) QueryIgPosts() *HPIgPostQuery
QueryIgPosts chains the current query on the "ig_posts" edge.
func (hbq *HPBlobQuery) QueryOwnerArtist() *HPArtistQuery
QueryOwnerArtist chains the current query on the "owner_artist" edge.
func (hbq *HPBlobQuery) QueryOwnerMember() *HPMemberQuery
QueryOwnerMember chains the current query on the "owner_member" edge.
func (hbq *HPBlobQuery) Select(fields ...string) *HPBlobSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.HPBlob.Query().
Select(hpblob.FieldCreatedAt).
Scan(ctx, &v)
func (hbq *HPBlobQuery) Unique(unique bool) *HPBlobQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (hbq *HPBlobQuery) Where(ps ...predicate.HPBlob) *HPBlobQuery
Where adds a new predicate for the HPBlobQuery builder.
func (hbq *HPBlobQuery) WithAmebloPosts(opts ...func(*HPAmebloPostQuery)) *HPBlobQuery
WithAmebloPosts tells the query-builder to eager-load the nodes that are connected to the "ameblo_posts" edge. The optional arguments are used to configure the query builder of the edge.
func (hbq *HPBlobQuery) WithIgPosts(opts ...func(*HPIgPostQuery)) *HPBlobQuery
WithIgPosts tells the query-builder to eager-load the nodes that are connected to the "ig_posts" edge. The optional arguments are used to configure the query builder of the edge.
func (hbq *HPBlobQuery) WithNamedAmebloPosts(name string, opts ...func(*HPAmebloPostQuery)) *HPBlobQuery
WithNamedAmebloPosts tells the query-builder to eager-load the nodes that are connected to the "ameblo_posts" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hbq *HPBlobQuery) WithNamedIgPosts(name string, opts ...func(*HPIgPostQuery)) *HPBlobQuery
WithNamedIgPosts tells the query-builder to eager-load the nodes that are connected to the "ig_posts" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hbq *HPBlobQuery) WithOwnerArtist(opts ...func(*HPArtistQuery)) *HPBlobQuery
WithOwnerArtist tells the query-builder to eager-load the nodes that are connected to the "owner_artist" edge. The optional arguments are used to configure the query builder of the edge.
func (hbq *HPBlobQuery) WithOwnerMember(opts ...func(*HPMemberQuery)) *HPBlobQuery
WithOwnerMember tells the query-builder to eager-load the nodes that are connected to the "owner_member" edge. The optional arguments are used to configure the query builder of the edge.
HPBlobSelect is the builder for selecting fields of HPBlob entities.
type HPBlobSelect struct {
*HPBlobQuery
// contains filtered or unexported fields
}
func (hbs *HPBlobSelect) Aggregate(fns ...AggregateFunc) *HPBlobSelect
Aggregate adds the given aggregation functions to the selector query.
func (s *HPBlobSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPBlobSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPBlobSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPBlobSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPBlobSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPBlobSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPBlobSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPBlobSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPBlobSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPBlobSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPBlobSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPBlobSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hbs *HPBlobSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPBlobSelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPBlobSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPBlobSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPBlobSelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPBlobSelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPBlobUpdate is the builder for updating HPBlob entities.
type HPBlobUpdate struct {
// contains filtered or unexported fields
}
func (hbu *HPBlobUpdate) AddAmebloPostIDs(ids ...int) *HPBlobUpdate
AddAmebloPostIDs adds the "ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hbu *HPBlobUpdate) AddAmebloPosts(h ...*HPAmebloPost) *HPBlobUpdate
AddAmebloPosts adds the "ameblo_posts" edges to the HPAmebloPost entity.
func (hbu *HPBlobUpdate) AddDurationSeconds(f float64) *HPBlobUpdate
AddDurationSeconds adds f to the "duration_seconds" field.
func (hbu *HPBlobUpdate) AddHeight(i int) *HPBlobUpdate
AddHeight adds i to the "height" field.
func (hbu *HPBlobUpdate) AddIgPostIDs(ids ...int) *HPBlobUpdate
AddIgPostIDs adds the "ig_posts" edge to the HPIgPost entity by IDs.
func (hbu *HPBlobUpdate) AddIgPosts(h ...*HPIgPost) *HPBlobUpdate
AddIgPosts adds the "ig_posts" edges to the HPIgPost entity.
func (hbu *HPBlobUpdate) AddNumFaces(i int) *HPBlobUpdate
AddNumFaces adds i to the "num_faces" field.
func (hbu *HPBlobUpdate) AddSize(i int64) *HPBlobUpdate
AddSize adds i to the "size" field.
func (hbu *HPBlobUpdate) AddStatusErrorCount(i int) *HPBlobUpdate
AddStatusErrorCount adds i to the "status_error_count" field.
func (hbu *HPBlobUpdate) AddWidth(i int) *HPBlobUpdate
AddWidth adds i to the "width" field.
func (hbu *HPBlobUpdate) ClearAmebloPosts() *HPBlobUpdate
ClearAmebloPosts clears all "ameblo_posts" edges to the HPAmebloPost entity.
func (hbu *HPBlobUpdate) ClearDurationSeconds() *HPBlobUpdate
ClearDurationSeconds clears the value of the "duration_seconds" field.
func (hbu *HPBlobUpdate) ClearFaceRecognitionStatus() *HPBlobUpdate
ClearFaceRecognitionStatus clears the value of the "face_recognition_status" field.
func (hbu *HPBlobUpdate) ClearFaces() *HPBlobUpdate
ClearFaces clears the value of the "faces" field.
func (hbu *HPBlobUpdate) ClearHeight() *HPBlobUpdate
ClearHeight clears the value of the "height" field.
func (hbu *HPBlobUpdate) ClearIgPosts() *HPBlobUpdate
ClearIgPosts clears all "ig_posts" edges to the HPIgPost entity.
func (hbu *HPBlobUpdate) ClearNumFaces() *HPBlobUpdate
ClearNumFaces clears the value of the "num_faces" field.
func (hbu *HPBlobUpdate) ClearOwnerArtist() *HPBlobUpdate
ClearOwnerArtist clears the "owner_artist" edge to the HPArtist entity.
func (hbu *HPBlobUpdate) ClearOwnerArtistID() *HPBlobUpdate
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (hbu *HPBlobUpdate) ClearOwnerMember() *HPBlobUpdate
ClearOwnerMember clears the "owner_member" edge to the HPMember entity.
func (hbu *HPBlobUpdate) ClearOwnerMemberID() *HPBlobUpdate
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (hbu *HPBlobUpdate) ClearSize() *HPBlobUpdate
ClearSize clears the value of the "size" field.
func (hbu *HPBlobUpdate) ClearStatusErrorCount() *HPBlobUpdate
ClearStatusErrorCount clears the value of the "status_error_count" field.
func (hbu *HPBlobUpdate) ClearStatusMessage() *HPBlobUpdate
ClearStatusMessage clears the value of the "status_message" field.
func (hbu *HPBlobUpdate) ClearThumbnail() *HPBlobUpdate
ClearThumbnail clears the value of the "thumbnail" field.
func (hbu *HPBlobUpdate) ClearUpdatedAt() *HPBlobUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (hbu *HPBlobUpdate) ClearWidth() *HPBlobUpdate
ClearWidth clears the value of the "width" field.
func (hbu *HPBlobUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (hbu *HPBlobUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hbu *HPBlobUpdate) Mutation() *HPBlobMutation
Mutation returns the HPBlobMutation object of the builder.
func (hbu *HPBlobUpdate) RemoveAmebloPostIDs(ids ...int) *HPBlobUpdate
RemoveAmebloPostIDs removes the "ameblo_posts" edge to HPAmebloPost entities by IDs.
func (hbu *HPBlobUpdate) RemoveAmebloPosts(h ...*HPAmebloPost) *HPBlobUpdate
RemoveAmebloPosts removes "ameblo_posts" edges to HPAmebloPost entities.
func (hbu *HPBlobUpdate) RemoveIgPostIDs(ids ...int) *HPBlobUpdate
RemoveIgPostIDs removes the "ig_posts" edge to HPIgPost entities by IDs.
func (hbu *HPBlobUpdate) RemoveIgPosts(h ...*HPIgPost) *HPBlobUpdate
RemoveIgPosts removes "ig_posts" edges to HPIgPost entities.
func (hbu *HPBlobUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (hbu *HPBlobUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (hbu *HPBlobUpdate) SetDurationSeconds(f float64) *HPBlobUpdate
SetDurationSeconds sets the "duration_seconds" field.
func (hbu *HPBlobUpdate) SetFaceRecognitionStatus(ebfrs enums.HPBlobFaceRecognitionStatus) *HPBlobUpdate
SetFaceRecognitionStatus sets the "face_recognition_status" field.
func (hbu *HPBlobUpdate) SetFaces(jbif jsonfields.HPBlobImageFace) *HPBlobUpdate
SetFaces sets the "faces" field.
func (hbu *HPBlobUpdate) SetHeight(i int) *HPBlobUpdate
SetHeight sets the "height" field.
func (hbu *HPBlobUpdate) SetNillableDurationSeconds(f *float64) *HPBlobUpdate
SetNillableDurationSeconds sets the "duration_seconds" field if the given value is not nil.
func (hbu *HPBlobUpdate) SetNillableFaceRecognitionStatus(ebfrs *enums.HPBlobFaceRecognitionStatus) *HPBlobUpdate
SetNillableFaceRecognitionStatus sets the "face_recognition_status" field if the given value is not nil.
func (hbu *HPBlobUpdate) SetNillableFaces(jbif *jsonfields.HPBlobImageFace) *HPBlobUpdate
SetNillableFaces sets the "faces" field if the given value is not nil.
func (hbu *HPBlobUpdate) SetNillableHeight(i *int) *HPBlobUpdate
SetNillableHeight sets the "height" field if the given value is not nil.
func (hbu *HPBlobUpdate) SetNillableNumFaces(i *int) *HPBlobUpdate
SetNillableNumFaces sets the "num_faces" field if the given value is not nil.
func (hbu *HPBlobUpdate) SetNillableOwnerArtistID(i *int) *HPBlobUpdate
SetNillableOwnerArtistID sets the "owner_artist_id" field if the given value is not nil.
func (hbu *HPBlobUpdate) SetNillableOwnerMemberID(i *int) *HPBlobUpdate
SetNillableOwnerMemberID sets the "owner_member_id" field if the given value is not nil.
func (hbu *HPBlobUpdate) SetNillableSize(i *int64) *HPBlobUpdate
SetNillableSize sets the "size" field if the given value is not nil.
func (hbu *HPBlobUpdate) SetNillableStatusErrorCount(i *int) *HPBlobUpdate
SetNillableStatusErrorCount sets the "status_error_count" field if the given value is not nil.
func (hbu *HPBlobUpdate) SetNillableStatusMessage(s *string) *HPBlobUpdate
SetNillableStatusMessage sets the "status_message" field if the given value is not nil.
func (hbu *HPBlobUpdate) SetNillableUpdatedAt(t *time.Time) *HPBlobUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hbu *HPBlobUpdate) SetNillableWidth(i *int) *HPBlobUpdate
SetNillableWidth sets the "width" field if the given value is not nil.
func (hbu *HPBlobUpdate) SetNumFaces(i int) *HPBlobUpdate
SetNumFaces sets the "num_faces" field.
func (hbu *HPBlobUpdate) SetOwnerArtist(h *HPArtist) *HPBlobUpdate
SetOwnerArtist sets the "owner_artist" edge to the HPArtist entity.
func (hbu *HPBlobUpdate) SetOwnerArtistID(i int) *HPBlobUpdate
SetOwnerArtistID sets the "owner_artist_id" field.
func (hbu *HPBlobUpdate) SetOwnerMember(h *HPMember) *HPBlobUpdate
SetOwnerMember sets the "owner_member" edge to the HPMember entity.
func (hbu *HPBlobUpdate) SetOwnerMemberID(i int) *HPBlobUpdate
SetOwnerMemberID sets the "owner_member_id" field.
func (hbu *HPBlobUpdate) SetSize(i int64) *HPBlobUpdate
SetSize sets the "size" field.
func (hbu *HPBlobUpdate) SetSourceHTMLURL(s string) *HPBlobUpdate
SetSourceHTMLURL sets the "source_html_url" field.
func (hbu *HPBlobUpdate) SetSourceURL(s string) *HPBlobUpdate
SetSourceURL sets the "source_url" field.
func (hbu *HPBlobUpdate) SetStatus(ebs enums.HPBlobStatus) *HPBlobUpdate
SetStatus sets the "status" field.
func (hbu *HPBlobUpdate) SetStatusErrorCount(i int) *HPBlobUpdate
SetStatusErrorCount sets the "status_error_count" field.
func (hbu *HPBlobUpdate) SetStatusMessage(s string) *HPBlobUpdate
SetStatusMessage sets the "status_message" field.
func (hbu *HPBlobUpdate) SetStoragePath(s string) *HPBlobUpdate
SetStoragePath sets the "storage_path" field.
func (hbu *HPBlobUpdate) SetSubType(ebst enums.HPBlobSubType) *HPBlobUpdate
SetSubType sets the "sub_type" field.
func (hbu *HPBlobUpdate) SetThumbnail(jbt *jsonfields.HPBlobThumbnail) *HPBlobUpdate
SetThumbnail sets the "thumbnail" field.
func (hbu *HPBlobUpdate) SetType(ebt enums.HPBlobType) *HPBlobUpdate
SetType sets the "type" field.
func (hbu *HPBlobUpdate) SetUpdatedAt(t time.Time) *HPBlobUpdate
SetUpdatedAt sets the "updated_at" field.
func (hbu *HPBlobUpdate) SetWidth(i int) *HPBlobUpdate
SetWidth sets the "width" field.
func (hbu *HPBlobUpdate) Where(ps ...predicate.HPBlob) *HPBlobUpdate
Where appends a list predicates to the HPBlobUpdate builder.
HPBlobUpdateOne is the builder for updating a single HPBlob entity.
type HPBlobUpdateOne struct {
// contains filtered or unexported fields
}
func (hbuo *HPBlobUpdateOne) AddAmebloPostIDs(ids ...int) *HPBlobUpdateOne
AddAmebloPostIDs adds the "ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hbuo *HPBlobUpdateOne) AddAmebloPosts(h ...*HPAmebloPost) *HPBlobUpdateOne
AddAmebloPosts adds the "ameblo_posts" edges to the HPAmebloPost entity.
func (hbuo *HPBlobUpdateOne) AddDurationSeconds(f float64) *HPBlobUpdateOne
AddDurationSeconds adds f to the "duration_seconds" field.
func (hbuo *HPBlobUpdateOne) AddHeight(i int) *HPBlobUpdateOne
AddHeight adds i to the "height" field.
func (hbuo *HPBlobUpdateOne) AddIgPostIDs(ids ...int) *HPBlobUpdateOne
AddIgPostIDs adds the "ig_posts" edge to the HPIgPost entity by IDs.
func (hbuo *HPBlobUpdateOne) AddIgPosts(h ...*HPIgPost) *HPBlobUpdateOne
AddIgPosts adds the "ig_posts" edges to the HPIgPost entity.
func (hbuo *HPBlobUpdateOne) AddNumFaces(i int) *HPBlobUpdateOne
AddNumFaces adds i to the "num_faces" field.
func (hbuo *HPBlobUpdateOne) AddSize(i int64) *HPBlobUpdateOne
AddSize adds i to the "size" field.
func (hbuo *HPBlobUpdateOne) AddStatusErrorCount(i int) *HPBlobUpdateOne
AddStatusErrorCount adds i to the "status_error_count" field.
func (hbuo *HPBlobUpdateOne) AddWidth(i int) *HPBlobUpdateOne
AddWidth adds i to the "width" field.
func (hbuo *HPBlobUpdateOne) ClearAmebloPosts() *HPBlobUpdateOne
ClearAmebloPosts clears all "ameblo_posts" edges to the HPAmebloPost entity.
func (hbuo *HPBlobUpdateOne) ClearDurationSeconds() *HPBlobUpdateOne
ClearDurationSeconds clears the value of the "duration_seconds" field.
func (hbuo *HPBlobUpdateOne) ClearFaceRecognitionStatus() *HPBlobUpdateOne
ClearFaceRecognitionStatus clears the value of the "face_recognition_status" field.
func (hbuo *HPBlobUpdateOne) ClearFaces() *HPBlobUpdateOne
ClearFaces clears the value of the "faces" field.
func (hbuo *HPBlobUpdateOne) ClearHeight() *HPBlobUpdateOne
ClearHeight clears the value of the "height" field.
func (hbuo *HPBlobUpdateOne) ClearIgPosts() *HPBlobUpdateOne
ClearIgPosts clears all "ig_posts" edges to the HPIgPost entity.
func (hbuo *HPBlobUpdateOne) ClearNumFaces() *HPBlobUpdateOne
ClearNumFaces clears the value of the "num_faces" field.
func (hbuo *HPBlobUpdateOne) ClearOwnerArtist() *HPBlobUpdateOne
ClearOwnerArtist clears the "owner_artist" edge to the HPArtist entity.
func (hbuo *HPBlobUpdateOne) ClearOwnerArtistID() *HPBlobUpdateOne
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (hbuo *HPBlobUpdateOne) ClearOwnerMember() *HPBlobUpdateOne
ClearOwnerMember clears the "owner_member" edge to the HPMember entity.
func (hbuo *HPBlobUpdateOne) ClearOwnerMemberID() *HPBlobUpdateOne
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (hbuo *HPBlobUpdateOne) ClearSize() *HPBlobUpdateOne
ClearSize clears the value of the "size" field.
func (hbuo *HPBlobUpdateOne) ClearStatusErrorCount() *HPBlobUpdateOne
ClearStatusErrorCount clears the value of the "status_error_count" field.
func (hbuo *HPBlobUpdateOne) ClearStatusMessage() *HPBlobUpdateOne
ClearStatusMessage clears the value of the "status_message" field.
func (hbuo *HPBlobUpdateOne) ClearThumbnail() *HPBlobUpdateOne
ClearThumbnail clears the value of the "thumbnail" field.
func (hbuo *HPBlobUpdateOne) ClearUpdatedAt() *HPBlobUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (hbuo *HPBlobUpdateOne) ClearWidth() *HPBlobUpdateOne
ClearWidth clears the value of the "width" field.
func (hbuo *HPBlobUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (hbuo *HPBlobUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hbuo *HPBlobUpdateOne) Mutation() *HPBlobMutation
Mutation returns the HPBlobMutation object of the builder.
func (hbuo *HPBlobUpdateOne) RemoveAmebloPostIDs(ids ...int) *HPBlobUpdateOne
RemoveAmebloPostIDs removes the "ameblo_posts" edge to HPAmebloPost entities by IDs.
func (hbuo *HPBlobUpdateOne) RemoveAmebloPosts(h ...*HPAmebloPost) *HPBlobUpdateOne
RemoveAmebloPosts removes "ameblo_posts" edges to HPAmebloPost entities.
func (hbuo *HPBlobUpdateOne) RemoveIgPostIDs(ids ...int) *HPBlobUpdateOne
RemoveIgPostIDs removes the "ig_posts" edge to HPIgPost entities by IDs.
func (hbuo *HPBlobUpdateOne) RemoveIgPosts(h ...*HPIgPost) *HPBlobUpdateOne
RemoveIgPosts removes "ig_posts" edges to HPIgPost entities.
func (hbuo *HPBlobUpdateOne) Save(ctx context.Context) (*HPBlob, error)
Save executes the query and returns the updated HPBlob entity.
func (hbuo *HPBlobUpdateOne) SaveX(ctx context.Context) *HPBlob
SaveX is like Save, but panics if an error occurs.
func (hbuo *HPBlobUpdateOne) Select(field string, fields ...string) *HPBlobUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (hbuo *HPBlobUpdateOne) SetDurationSeconds(f float64) *HPBlobUpdateOne
SetDurationSeconds sets the "duration_seconds" field.
func (hbuo *HPBlobUpdateOne) SetFaceRecognitionStatus(ebfrs enums.HPBlobFaceRecognitionStatus) *HPBlobUpdateOne
SetFaceRecognitionStatus sets the "face_recognition_status" field.
func (hbuo *HPBlobUpdateOne) SetFaces(jbif jsonfields.HPBlobImageFace) *HPBlobUpdateOne
SetFaces sets the "faces" field.
func (hbuo *HPBlobUpdateOne) SetHeight(i int) *HPBlobUpdateOne
SetHeight sets the "height" field.
func (hbuo *HPBlobUpdateOne) SetNillableDurationSeconds(f *float64) *HPBlobUpdateOne
SetNillableDurationSeconds sets the "duration_seconds" field if the given value is not nil.
func (hbuo *HPBlobUpdateOne) SetNillableFaceRecognitionStatus(ebfrs *enums.HPBlobFaceRecognitionStatus) *HPBlobUpdateOne
SetNillableFaceRecognitionStatus sets the "face_recognition_status" field if the given value is not nil.
func (hbuo *HPBlobUpdateOne) SetNillableFaces(jbif *jsonfields.HPBlobImageFace) *HPBlobUpdateOne
SetNillableFaces sets the "faces" field if the given value is not nil.
func (hbuo *HPBlobUpdateOne) SetNillableHeight(i *int) *HPBlobUpdateOne
SetNillableHeight sets the "height" field if the given value is not nil.
func (hbuo *HPBlobUpdateOne) SetNillableNumFaces(i *int) *HPBlobUpdateOne
SetNillableNumFaces sets the "num_faces" field if the given value is not nil.
func (hbuo *HPBlobUpdateOne) SetNillableOwnerArtistID(i *int) *HPBlobUpdateOne
SetNillableOwnerArtistID sets the "owner_artist_id" field if the given value is not nil.
func (hbuo *HPBlobUpdateOne) SetNillableOwnerMemberID(i *int) *HPBlobUpdateOne
SetNillableOwnerMemberID sets the "owner_member_id" field if the given value is not nil.
func (hbuo *HPBlobUpdateOne) SetNillableSize(i *int64) *HPBlobUpdateOne
SetNillableSize sets the "size" field if the given value is not nil.
func (hbuo *HPBlobUpdateOne) SetNillableStatusErrorCount(i *int) *HPBlobUpdateOne
SetNillableStatusErrorCount sets the "status_error_count" field if the given value is not nil.
func (hbuo *HPBlobUpdateOne) SetNillableStatusMessage(s *string) *HPBlobUpdateOne
SetNillableStatusMessage sets the "status_message" field if the given value is not nil.
func (hbuo *HPBlobUpdateOne) SetNillableUpdatedAt(t *time.Time) *HPBlobUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hbuo *HPBlobUpdateOne) SetNillableWidth(i *int) *HPBlobUpdateOne
SetNillableWidth sets the "width" field if the given value is not nil.
func (hbuo *HPBlobUpdateOne) SetNumFaces(i int) *HPBlobUpdateOne
SetNumFaces sets the "num_faces" field.
func (hbuo *HPBlobUpdateOne) SetOwnerArtist(h *HPArtist) *HPBlobUpdateOne
SetOwnerArtist sets the "owner_artist" edge to the HPArtist entity.
func (hbuo *HPBlobUpdateOne) SetOwnerArtistID(i int) *HPBlobUpdateOne
SetOwnerArtistID sets the "owner_artist_id" field.
func (hbuo *HPBlobUpdateOne) SetOwnerMember(h *HPMember) *HPBlobUpdateOne
SetOwnerMember sets the "owner_member" edge to the HPMember entity.
func (hbuo *HPBlobUpdateOne) SetOwnerMemberID(i int) *HPBlobUpdateOne
SetOwnerMemberID sets the "owner_member_id" field.
func (hbuo *HPBlobUpdateOne) SetSize(i int64) *HPBlobUpdateOne
SetSize sets the "size" field.
func (hbuo *HPBlobUpdateOne) SetSourceHTMLURL(s string) *HPBlobUpdateOne
SetSourceHTMLURL sets the "source_html_url" field.
func (hbuo *HPBlobUpdateOne) SetSourceURL(s string) *HPBlobUpdateOne
SetSourceURL sets the "source_url" field.
func (hbuo *HPBlobUpdateOne) SetStatus(ebs enums.HPBlobStatus) *HPBlobUpdateOne
SetStatus sets the "status" field.
func (hbuo *HPBlobUpdateOne) SetStatusErrorCount(i int) *HPBlobUpdateOne
SetStatusErrorCount sets the "status_error_count" field.
func (hbuo *HPBlobUpdateOne) SetStatusMessage(s string) *HPBlobUpdateOne
SetStatusMessage sets the "status_message" field.
func (hbuo *HPBlobUpdateOne) SetStoragePath(s string) *HPBlobUpdateOne
SetStoragePath sets the "storage_path" field.
func (hbuo *HPBlobUpdateOne) SetSubType(ebst enums.HPBlobSubType) *HPBlobUpdateOne
SetSubType sets the "sub_type" field.
func (hbuo *HPBlobUpdateOne) SetThumbnail(jbt *jsonfields.HPBlobThumbnail) *HPBlobUpdateOne
SetThumbnail sets the "thumbnail" field.
func (hbuo *HPBlobUpdateOne) SetType(ebt enums.HPBlobType) *HPBlobUpdateOne
SetType sets the "type" field.
func (hbuo *HPBlobUpdateOne) SetUpdatedAt(t time.Time) *HPBlobUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (hbuo *HPBlobUpdateOne) SetWidth(i int) *HPBlobUpdateOne
SetWidth sets the "width" field.
func (hbuo *HPBlobUpdateOne) Where(ps ...predicate.HPBlob) *HPBlobUpdateOne
Where appends a list predicates to the HPBlobUpdate builder.
HPBlobUpsert is the "OnConflict" setter.
type HPBlobUpsert struct {
*sql.UpdateSet
}
func (u *HPBlobUpsert) AddDurationSeconds(v float64) *HPBlobUpsert
AddDurationSeconds adds v to the "duration_seconds" field.
func (u *HPBlobUpsert) AddHeight(v int) *HPBlobUpsert
AddHeight adds v to the "height" field.
func (u *HPBlobUpsert) AddNumFaces(v int) *HPBlobUpsert
AddNumFaces adds v to the "num_faces" field.
func (u *HPBlobUpsert) AddSize(v int64) *HPBlobUpsert
AddSize adds v to the "size" field.
func (u *HPBlobUpsert) AddStatusErrorCount(v int) *HPBlobUpsert
AddStatusErrorCount adds v to the "status_error_count" field.
func (u *HPBlobUpsert) AddWidth(v int) *HPBlobUpsert
AddWidth adds v to the "width" field.
func (u *HPBlobUpsert) ClearDurationSeconds() *HPBlobUpsert
ClearDurationSeconds clears the value of the "duration_seconds" field.
func (u *HPBlobUpsert) ClearFaceRecognitionStatus() *HPBlobUpsert
ClearFaceRecognitionStatus clears the value of the "face_recognition_status" field.
func (u *HPBlobUpsert) ClearFaces() *HPBlobUpsert
ClearFaces clears the value of the "faces" field.
func (u *HPBlobUpsert) ClearHeight() *HPBlobUpsert
ClearHeight clears the value of the "height" field.
func (u *HPBlobUpsert) ClearNumFaces() *HPBlobUpsert
ClearNumFaces clears the value of the "num_faces" field.
func (u *HPBlobUpsert) ClearOwnerArtistID() *HPBlobUpsert
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (u *HPBlobUpsert) ClearOwnerMemberID() *HPBlobUpsert
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (u *HPBlobUpsert) ClearSize() *HPBlobUpsert
ClearSize clears the value of the "size" field.
func (u *HPBlobUpsert) ClearStatusErrorCount() *HPBlobUpsert
ClearStatusErrorCount clears the value of the "status_error_count" field.
func (u *HPBlobUpsert) ClearStatusMessage() *HPBlobUpsert
ClearStatusMessage clears the value of the "status_message" field.
func (u *HPBlobUpsert) ClearThumbnail() *HPBlobUpsert
ClearThumbnail clears the value of the "thumbnail" field.
func (u *HPBlobUpsert) ClearUpdatedAt() *HPBlobUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPBlobUpsert) ClearWidth() *HPBlobUpsert
ClearWidth clears the value of the "width" field.
func (u *HPBlobUpsert) SetDurationSeconds(v float64) *HPBlobUpsert
SetDurationSeconds sets the "duration_seconds" field.
func (u *HPBlobUpsert) SetFaceRecognitionStatus(v enums.HPBlobFaceRecognitionStatus) *HPBlobUpsert
SetFaceRecognitionStatus sets the "face_recognition_status" field.
func (u *HPBlobUpsert) SetFaces(v jsonfields.HPBlobImageFace) *HPBlobUpsert
SetFaces sets the "faces" field.
func (u *HPBlobUpsert) SetHeight(v int) *HPBlobUpsert
SetHeight sets the "height" field.
func (u *HPBlobUpsert) SetNumFaces(v int) *HPBlobUpsert
SetNumFaces sets the "num_faces" field.
func (u *HPBlobUpsert) SetOwnerArtistID(v int) *HPBlobUpsert
SetOwnerArtistID sets the "owner_artist_id" field.
func (u *HPBlobUpsert) SetOwnerMemberID(v int) *HPBlobUpsert
SetOwnerMemberID sets the "owner_member_id" field.
func (u *HPBlobUpsert) SetSize(v int64) *HPBlobUpsert
SetSize sets the "size" field.
func (u *HPBlobUpsert) SetSourceHTMLURL(v string) *HPBlobUpsert
SetSourceHTMLURL sets the "source_html_url" field.
func (u *HPBlobUpsert) SetSourceURL(v string) *HPBlobUpsert
SetSourceURL sets the "source_url" field.
func (u *HPBlobUpsert) SetStatus(v enums.HPBlobStatus) *HPBlobUpsert
SetStatus sets the "status" field.
func (u *HPBlobUpsert) SetStatusErrorCount(v int) *HPBlobUpsert
SetStatusErrorCount sets the "status_error_count" field.
func (u *HPBlobUpsert) SetStatusMessage(v string) *HPBlobUpsert
SetStatusMessage sets the "status_message" field.
func (u *HPBlobUpsert) SetStoragePath(v string) *HPBlobUpsert
SetStoragePath sets the "storage_path" field.
func (u *HPBlobUpsert) SetSubType(v enums.HPBlobSubType) *HPBlobUpsert
SetSubType sets the "sub_type" field.
func (u *HPBlobUpsert) SetThumbnail(v *jsonfields.HPBlobThumbnail) *HPBlobUpsert
SetThumbnail sets the "thumbnail" field.
func (u *HPBlobUpsert) SetType(v enums.HPBlobType) *HPBlobUpsert
SetType sets the "type" field.
func (u *HPBlobUpsert) SetUpdatedAt(v time.Time) *HPBlobUpsert
SetUpdatedAt sets the "updated_at" field.
func (u *HPBlobUpsert) SetWidth(v int) *HPBlobUpsert
SetWidth sets the "width" field.
func (u *HPBlobUpsert) UpdateDurationSeconds() *HPBlobUpsert
UpdateDurationSeconds sets the "duration_seconds" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateFaceRecognitionStatus() *HPBlobUpsert
UpdateFaceRecognitionStatus sets the "face_recognition_status" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateFaces() *HPBlobUpsert
UpdateFaces sets the "faces" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateHeight() *HPBlobUpsert
UpdateHeight sets the "height" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateNumFaces() *HPBlobUpsert
UpdateNumFaces sets the "num_faces" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateOwnerArtistID() *HPBlobUpsert
UpdateOwnerArtistID sets the "owner_artist_id" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateOwnerMemberID() *HPBlobUpsert
UpdateOwnerMemberID sets the "owner_member_id" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateSize() *HPBlobUpsert
UpdateSize sets the "size" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateSourceHTMLURL() *HPBlobUpsert
UpdateSourceHTMLURL sets the "source_html_url" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateSourceURL() *HPBlobUpsert
UpdateSourceURL sets the "source_url" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateStatus() *HPBlobUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateStatusErrorCount() *HPBlobUpsert
UpdateStatusErrorCount sets the "status_error_count" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateStatusMessage() *HPBlobUpsert
UpdateStatusMessage sets the "status_message" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateStoragePath() *HPBlobUpsert
UpdateStoragePath sets the "storage_path" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateSubType() *HPBlobUpsert
UpdateSubType sets the "sub_type" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateThumbnail() *HPBlobUpsert
UpdateThumbnail sets the "thumbnail" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateType() *HPBlobUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateUpdatedAt() *HPBlobUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (u *HPBlobUpsert) UpdateWidth() *HPBlobUpsert
UpdateWidth sets the "width" field to the value that was provided on create.
HPBlobUpsertBulk is the builder for "upsert"-ing a bulk of HPBlob nodes.
type HPBlobUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *HPBlobUpsertBulk) AddDurationSeconds(v float64) *HPBlobUpsertBulk
AddDurationSeconds adds v to the "duration_seconds" field.
func (u *HPBlobUpsertBulk) AddHeight(v int) *HPBlobUpsertBulk
AddHeight adds v to the "height" field.
func (u *HPBlobUpsertBulk) AddNumFaces(v int) *HPBlobUpsertBulk
AddNumFaces adds v to the "num_faces" field.
func (u *HPBlobUpsertBulk) AddSize(v int64) *HPBlobUpsertBulk
AddSize adds v to the "size" field.
func (u *HPBlobUpsertBulk) AddStatusErrorCount(v int) *HPBlobUpsertBulk
AddStatusErrorCount adds v to the "status_error_count" field.
func (u *HPBlobUpsertBulk) AddWidth(v int) *HPBlobUpsertBulk
AddWidth adds v to the "width" field.
func (u *HPBlobUpsertBulk) ClearDurationSeconds() *HPBlobUpsertBulk
ClearDurationSeconds clears the value of the "duration_seconds" field.
func (u *HPBlobUpsertBulk) ClearFaceRecognitionStatus() *HPBlobUpsertBulk
ClearFaceRecognitionStatus clears the value of the "face_recognition_status" field.
func (u *HPBlobUpsertBulk) ClearFaces() *HPBlobUpsertBulk
ClearFaces clears the value of the "faces" field.
func (u *HPBlobUpsertBulk) ClearHeight() *HPBlobUpsertBulk
ClearHeight clears the value of the "height" field.
func (u *HPBlobUpsertBulk) ClearNumFaces() *HPBlobUpsertBulk
ClearNumFaces clears the value of the "num_faces" field.
func (u *HPBlobUpsertBulk) ClearOwnerArtistID() *HPBlobUpsertBulk
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (u *HPBlobUpsertBulk) ClearOwnerMemberID() *HPBlobUpsertBulk
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (u *HPBlobUpsertBulk) ClearSize() *HPBlobUpsertBulk
ClearSize clears the value of the "size" field.
func (u *HPBlobUpsertBulk) ClearStatusErrorCount() *HPBlobUpsertBulk
ClearStatusErrorCount clears the value of the "status_error_count" field.
func (u *HPBlobUpsertBulk) ClearStatusMessage() *HPBlobUpsertBulk
ClearStatusMessage clears the value of the "status_message" field.
func (u *HPBlobUpsertBulk) ClearThumbnail() *HPBlobUpsertBulk
ClearThumbnail clears the value of the "thumbnail" field.
func (u *HPBlobUpsertBulk) ClearUpdatedAt() *HPBlobUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPBlobUpsertBulk) ClearWidth() *HPBlobUpsertBulk
ClearWidth clears the value of the "width" field.
func (u *HPBlobUpsertBulk) DoNothing() *HPBlobUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPBlobUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPBlobUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPBlobUpsertBulk) Ignore() *HPBlobUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPBlob.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *HPBlobUpsertBulk) SetDurationSeconds(v float64) *HPBlobUpsertBulk
SetDurationSeconds sets the "duration_seconds" field.
func (u *HPBlobUpsertBulk) SetFaceRecognitionStatus(v enums.HPBlobFaceRecognitionStatus) *HPBlobUpsertBulk
SetFaceRecognitionStatus sets the "face_recognition_status" field.
func (u *HPBlobUpsertBulk) SetFaces(v jsonfields.HPBlobImageFace) *HPBlobUpsertBulk
SetFaces sets the "faces" field.
func (u *HPBlobUpsertBulk) SetHeight(v int) *HPBlobUpsertBulk
SetHeight sets the "height" field.
func (u *HPBlobUpsertBulk) SetNumFaces(v int) *HPBlobUpsertBulk
SetNumFaces sets the "num_faces" field.
func (u *HPBlobUpsertBulk) SetOwnerArtistID(v int) *HPBlobUpsertBulk
SetOwnerArtistID sets the "owner_artist_id" field.
func (u *HPBlobUpsertBulk) SetOwnerMemberID(v int) *HPBlobUpsertBulk
SetOwnerMemberID sets the "owner_member_id" field.
func (u *HPBlobUpsertBulk) SetSize(v int64) *HPBlobUpsertBulk
SetSize sets the "size" field.
func (u *HPBlobUpsertBulk) SetSourceHTMLURL(v string) *HPBlobUpsertBulk
SetSourceHTMLURL sets the "source_html_url" field.
func (u *HPBlobUpsertBulk) SetSourceURL(v string) *HPBlobUpsertBulk
SetSourceURL sets the "source_url" field.
func (u *HPBlobUpsertBulk) SetStatus(v enums.HPBlobStatus) *HPBlobUpsertBulk
SetStatus sets the "status" field.
func (u *HPBlobUpsertBulk) SetStatusErrorCount(v int) *HPBlobUpsertBulk
SetStatusErrorCount sets the "status_error_count" field.
func (u *HPBlobUpsertBulk) SetStatusMessage(v string) *HPBlobUpsertBulk
SetStatusMessage sets the "status_message" field.
func (u *HPBlobUpsertBulk) SetStoragePath(v string) *HPBlobUpsertBulk
SetStoragePath sets the "storage_path" field.
func (u *HPBlobUpsertBulk) SetSubType(v enums.HPBlobSubType) *HPBlobUpsertBulk
SetSubType sets the "sub_type" field.
func (u *HPBlobUpsertBulk) SetThumbnail(v *jsonfields.HPBlobThumbnail) *HPBlobUpsertBulk
SetThumbnail sets the "thumbnail" field.
func (u *HPBlobUpsertBulk) SetType(v enums.HPBlobType) *HPBlobUpsertBulk
SetType sets the "type" field.
func (u *HPBlobUpsertBulk) SetUpdatedAt(v time.Time) *HPBlobUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (u *HPBlobUpsertBulk) SetWidth(v int) *HPBlobUpsertBulk
SetWidth sets the "width" field.
func (u *HPBlobUpsertBulk) Update(set func(*HPBlobUpsert)) *HPBlobUpsertBulk
Update allows overriding fields `UPDATE` values. See the HPBlobCreateBulk.OnConflict documentation for more info.
func (u *HPBlobUpsertBulk) UpdateDurationSeconds() *HPBlobUpsertBulk
UpdateDurationSeconds sets the "duration_seconds" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateFaceRecognitionStatus() *HPBlobUpsertBulk
UpdateFaceRecognitionStatus sets the "face_recognition_status" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateFaces() *HPBlobUpsertBulk
UpdateFaces sets the "faces" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateHeight() *HPBlobUpsertBulk
UpdateHeight sets the "height" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateNewValues() *HPBlobUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPBlob.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPBlobUpsertBulk) UpdateNumFaces() *HPBlobUpsertBulk
UpdateNumFaces sets the "num_faces" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateOwnerArtistID() *HPBlobUpsertBulk
UpdateOwnerArtistID sets the "owner_artist_id" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateOwnerMemberID() *HPBlobUpsertBulk
UpdateOwnerMemberID sets the "owner_member_id" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateSize() *HPBlobUpsertBulk
UpdateSize sets the "size" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateSourceHTMLURL() *HPBlobUpsertBulk
UpdateSourceHTMLURL sets the "source_html_url" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateSourceURL() *HPBlobUpsertBulk
UpdateSourceURL sets the "source_url" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateStatus() *HPBlobUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateStatusErrorCount() *HPBlobUpsertBulk
UpdateStatusErrorCount sets the "status_error_count" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateStatusMessage() *HPBlobUpsertBulk
UpdateStatusMessage sets the "status_message" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateStoragePath() *HPBlobUpsertBulk
UpdateStoragePath sets the "storage_path" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateSubType() *HPBlobUpsertBulk
UpdateSubType sets the "sub_type" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateThumbnail() *HPBlobUpsertBulk
UpdateThumbnail sets the "thumbnail" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateType() *HPBlobUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateUpdatedAt() *HPBlobUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (u *HPBlobUpsertBulk) UpdateWidth() *HPBlobUpsertBulk
UpdateWidth sets the "width" field to the value that was provided on create.
HPBlobUpsertOne is the builder for "upsert"-ing
one HPBlob node.
type HPBlobUpsertOne struct {
// contains filtered or unexported fields
}
func (u *HPBlobUpsertOne) AddDurationSeconds(v float64) *HPBlobUpsertOne
AddDurationSeconds adds v to the "duration_seconds" field.
func (u *HPBlobUpsertOne) AddHeight(v int) *HPBlobUpsertOne
AddHeight adds v to the "height" field.
func (u *HPBlobUpsertOne) AddNumFaces(v int) *HPBlobUpsertOne
AddNumFaces adds v to the "num_faces" field.
func (u *HPBlobUpsertOne) AddSize(v int64) *HPBlobUpsertOne
AddSize adds v to the "size" field.
func (u *HPBlobUpsertOne) AddStatusErrorCount(v int) *HPBlobUpsertOne
AddStatusErrorCount adds v to the "status_error_count" field.
func (u *HPBlobUpsertOne) AddWidth(v int) *HPBlobUpsertOne
AddWidth adds v to the "width" field.
func (u *HPBlobUpsertOne) ClearDurationSeconds() *HPBlobUpsertOne
ClearDurationSeconds clears the value of the "duration_seconds" field.
func (u *HPBlobUpsertOne) ClearFaceRecognitionStatus() *HPBlobUpsertOne
ClearFaceRecognitionStatus clears the value of the "face_recognition_status" field.
func (u *HPBlobUpsertOne) ClearFaces() *HPBlobUpsertOne
ClearFaces clears the value of the "faces" field.
func (u *HPBlobUpsertOne) ClearHeight() *HPBlobUpsertOne
ClearHeight clears the value of the "height" field.
func (u *HPBlobUpsertOne) ClearNumFaces() *HPBlobUpsertOne
ClearNumFaces clears the value of the "num_faces" field.
func (u *HPBlobUpsertOne) ClearOwnerArtistID() *HPBlobUpsertOne
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (u *HPBlobUpsertOne) ClearOwnerMemberID() *HPBlobUpsertOne
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (u *HPBlobUpsertOne) ClearSize() *HPBlobUpsertOne
ClearSize clears the value of the "size" field.
func (u *HPBlobUpsertOne) ClearStatusErrorCount() *HPBlobUpsertOne
ClearStatusErrorCount clears the value of the "status_error_count" field.
func (u *HPBlobUpsertOne) ClearStatusMessage() *HPBlobUpsertOne
ClearStatusMessage clears the value of the "status_message" field.
func (u *HPBlobUpsertOne) ClearThumbnail() *HPBlobUpsertOne
ClearThumbnail clears the value of the "thumbnail" field.
func (u *HPBlobUpsertOne) ClearUpdatedAt() *HPBlobUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPBlobUpsertOne) ClearWidth() *HPBlobUpsertOne
ClearWidth clears the value of the "width" field.
func (u *HPBlobUpsertOne) DoNothing() *HPBlobUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPBlobUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPBlobUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPBlobUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *HPBlobUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *HPBlobUpsertOne) Ignore() *HPBlobUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPBlob.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *HPBlobUpsertOne) SetDurationSeconds(v float64) *HPBlobUpsertOne
SetDurationSeconds sets the "duration_seconds" field.
func (u *HPBlobUpsertOne) SetFaceRecognitionStatus(v enums.HPBlobFaceRecognitionStatus) *HPBlobUpsertOne
SetFaceRecognitionStatus sets the "face_recognition_status" field.
func (u *HPBlobUpsertOne) SetFaces(v jsonfields.HPBlobImageFace) *HPBlobUpsertOne
SetFaces sets the "faces" field.
func (u *HPBlobUpsertOne) SetHeight(v int) *HPBlobUpsertOne
SetHeight sets the "height" field.
func (u *HPBlobUpsertOne) SetNumFaces(v int) *HPBlobUpsertOne
SetNumFaces sets the "num_faces" field.
func (u *HPBlobUpsertOne) SetOwnerArtistID(v int) *HPBlobUpsertOne
SetOwnerArtistID sets the "owner_artist_id" field.
func (u *HPBlobUpsertOne) SetOwnerMemberID(v int) *HPBlobUpsertOne
SetOwnerMemberID sets the "owner_member_id" field.
func (u *HPBlobUpsertOne) SetSize(v int64) *HPBlobUpsertOne
SetSize sets the "size" field.
func (u *HPBlobUpsertOne) SetSourceHTMLURL(v string) *HPBlobUpsertOne
SetSourceHTMLURL sets the "source_html_url" field.
func (u *HPBlobUpsertOne) SetSourceURL(v string) *HPBlobUpsertOne
SetSourceURL sets the "source_url" field.
func (u *HPBlobUpsertOne) SetStatus(v enums.HPBlobStatus) *HPBlobUpsertOne
SetStatus sets the "status" field.
func (u *HPBlobUpsertOne) SetStatusErrorCount(v int) *HPBlobUpsertOne
SetStatusErrorCount sets the "status_error_count" field.
func (u *HPBlobUpsertOne) SetStatusMessage(v string) *HPBlobUpsertOne
SetStatusMessage sets the "status_message" field.
func (u *HPBlobUpsertOne) SetStoragePath(v string) *HPBlobUpsertOne
SetStoragePath sets the "storage_path" field.
func (u *HPBlobUpsertOne) SetSubType(v enums.HPBlobSubType) *HPBlobUpsertOne
SetSubType sets the "sub_type" field.
func (u *HPBlobUpsertOne) SetThumbnail(v *jsonfields.HPBlobThumbnail) *HPBlobUpsertOne
SetThumbnail sets the "thumbnail" field.
func (u *HPBlobUpsertOne) SetType(v enums.HPBlobType) *HPBlobUpsertOne
SetType sets the "type" field.
func (u *HPBlobUpsertOne) SetUpdatedAt(v time.Time) *HPBlobUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (u *HPBlobUpsertOne) SetWidth(v int) *HPBlobUpsertOne
SetWidth sets the "width" field.
func (u *HPBlobUpsertOne) Update(set func(*HPBlobUpsert)) *HPBlobUpsertOne
Update allows overriding fields `UPDATE` values. See the HPBlobCreate.OnConflict documentation for more info.
func (u *HPBlobUpsertOne) UpdateDurationSeconds() *HPBlobUpsertOne
UpdateDurationSeconds sets the "duration_seconds" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateFaceRecognitionStatus() *HPBlobUpsertOne
UpdateFaceRecognitionStatus sets the "face_recognition_status" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateFaces() *HPBlobUpsertOne
UpdateFaces sets the "faces" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateHeight() *HPBlobUpsertOne
UpdateHeight sets the "height" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateNewValues() *HPBlobUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPBlob.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPBlobUpsertOne) UpdateNumFaces() *HPBlobUpsertOne
UpdateNumFaces sets the "num_faces" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateOwnerArtistID() *HPBlobUpsertOne
UpdateOwnerArtistID sets the "owner_artist_id" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateOwnerMemberID() *HPBlobUpsertOne
UpdateOwnerMemberID sets the "owner_member_id" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateSize() *HPBlobUpsertOne
UpdateSize sets the "size" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateSourceHTMLURL() *HPBlobUpsertOne
UpdateSourceHTMLURL sets the "source_html_url" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateSourceURL() *HPBlobUpsertOne
UpdateSourceURL sets the "source_url" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateStatus() *HPBlobUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateStatusErrorCount() *HPBlobUpsertOne
UpdateStatusErrorCount sets the "status_error_count" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateStatusMessage() *HPBlobUpsertOne
UpdateStatusMessage sets the "status_message" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateStoragePath() *HPBlobUpsertOne
UpdateStoragePath sets the "storage_path" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateSubType() *HPBlobUpsertOne
UpdateSubType sets the "sub_type" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateThumbnail() *HPBlobUpsertOne
UpdateThumbnail sets the "thumbnail" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateType() *HPBlobUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateUpdatedAt() *HPBlobUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (u *HPBlobUpsertOne) UpdateWidth() *HPBlobUpsertOne
UpdateWidth sets the "width" field to the value that was provided on create.
HPBlobs is a parsable slice of HPBlob.
type HPBlobs []*HPBlob
HPElineupMallItem is the model entity for the HPElineupMallItem schema.
type HPElineupMallItem struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CrawledAt holds the value of the "crawled_at" field.
CrawledAt *time.Time `json:"crawled_at,omitempty"`
// ErrorCount holds the value of the "error_count" field.
ErrorCount int `json:"error_count,omitempty"`
// ManuallyModified holds the value of the "manually_modified" field.
ManuallyModified *jsonfields.ManuallyModified `json:"manually_modified,omitempty"`
// LastErrorMessage holds the value of the "last_error_message" field.
LastErrorMessage *string `json:"last_error_message,omitempty"`
// RecrawlRequired holds the value of the "recrawl_required" field.
RecrawlRequired bool `json:"recrawl_required,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Permalink holds the value of the "permalink" field.
Permalink string `json:"permalink,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// Description holds the value of the "description" field.
Description string `json:"description,omitempty"`
// Supplier holds the value of the "supplier" field.
Supplier string `json:"supplier,omitempty"`
// Price holds the value of the "price" field.
Price int `json:"price,omitempty"`
// IsLimitedToFc holds the value of the "is_limited_to_fc" field.
IsLimitedToFc bool `json:"is_limited_to_fc,omitempty"`
// IsOutOfStock holds the value of the "is_out_of_stock" field.
IsOutOfStock bool `json:"is_out_of_stock,omitempty"`
// Images holds the value of the "images" field.
Images []jsonfields.Media `json:"images,omitempty"`
// Category holds the value of the "category" field.
Category enums.HPElineupMallItemCategory `json:"category,omitempty"`
// OrderStartAt holds the value of the "order_start_at" field.
OrderStartAt *time.Time `json:"order_start_at,omitempty"`
// OrderEndAt holds the value of the "order_end_at" field.
OrderEndAt *time.Time `json:"order_end_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the HPElineupMallItemQuery when eager-loading is set.
Edges HPElineupMallItemEdges `json:"edges"`
// contains filtered or unexported fields
}
func (n *HPElineupMallItem) IsNode()
IsNode implements the Node interface check for GQLGen.
func (hemi *HPElineupMallItem) NamedTaggedArtists(name string) ([]*HPArtist, error)
NamedTaggedArtists returns the TaggedArtists named value or an error if the edge was not loaded in eager-loading with this name.
func (hemi *HPElineupMallItem) NamedTaggedMembers(name string) ([]*HPMember, error)
NamedTaggedMembers returns the TaggedMembers named value or an error if the edge was not loaded in eager-loading with this name.
func (hemi *HPElineupMallItem) QueryTaggedArtists() *HPArtistQuery
QueryTaggedArtists queries the "tagged_artists" edge of the HPElineupMallItem entity.
func (hemi *HPElineupMallItem) QueryTaggedMembers() *HPMemberQuery
QueryTaggedMembers queries the "tagged_members" edge of the HPElineupMallItem entity.
func (hemi *HPElineupMallItem) String() string
String implements the fmt.Stringer.
func (hemi *HPElineupMallItem) TaggedArtists(ctx context.Context) (result []*HPArtist, err error)
func (hemi *HPElineupMallItem) TaggedMembers(ctx context.Context) (result []*HPMember, err error)
func (hemi *HPElineupMallItem) ToEdge(order *HPElineupMallItemOrder) *HPElineupMallItemEdge
ToEdge converts HPElineupMallItem into HPElineupMallItemEdge.
func (hemi *HPElineupMallItem) Unwrap() *HPElineupMallItem
Unwrap unwraps the HPElineupMallItem entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (hemi *HPElineupMallItem) Update() *HPElineupMallItemUpdateOne
Update returns a builder for updating this HPElineupMallItem. Note that you need to call HPElineupMallItem.Unwrap() before calling this method if this HPElineupMallItem was returned from a transaction, and the transaction was committed or rolled back.
func (hemi *HPElineupMallItem) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the HPElineupMallItem. This includes values selected through modifiers, order, etc.
HPElineupMallItemClient is a client for the HPElineupMallItem schema.
type HPElineupMallItemClient struct {
// contains filtered or unexported fields
}
func NewHPElineupMallItemClient(c config) *HPElineupMallItemClient
NewHPElineupMallItemClient returns a client for the HPElineupMallItem from the given config.
func (c *HPElineupMallItemClient) Create() *HPElineupMallItemCreate
Create returns a builder for creating a HPElineupMallItem entity.
func (c *HPElineupMallItemClient) CreateBulk(builders ...*HPElineupMallItemCreate) *HPElineupMallItemCreateBulk
CreateBulk returns a builder for creating a bulk of HPElineupMallItem entities.
func (c *HPElineupMallItemClient) Delete() *HPElineupMallItemDelete
Delete returns a delete builder for HPElineupMallItem.
func (c *HPElineupMallItemClient) DeleteOne(hemi *HPElineupMallItem) *HPElineupMallItemDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *HPElineupMallItemClient) DeleteOneID(id int) *HPElineupMallItemDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *HPElineupMallItemClient) Get(ctx context.Context, id int) (*HPElineupMallItem, error)
Get returns a HPElineupMallItem entity by its id.
func (c *HPElineupMallItemClient) GetX(ctx context.Context, id int) *HPElineupMallItem
GetX is like Get, but panics if an error occurs.
func (c *HPElineupMallItemClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *HPElineupMallItemClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hpelineupmallitem.Intercept(f(g(h())))`.
func (c *HPElineupMallItemClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *HPElineupMallItemClient) Query() *HPElineupMallItemQuery
Query returns a query builder for HPElineupMallItem.
func (c *HPElineupMallItemClient) QueryTaggedArtists(hemi *HPElineupMallItem) *HPArtistQuery
QueryTaggedArtists queries the tagged_artists edge of a HPElineupMallItem.
func (c *HPElineupMallItemClient) QueryTaggedMembers(hemi *HPElineupMallItem) *HPMemberQuery
QueryTaggedMembers queries the tagged_members edge of a HPElineupMallItem.
func (c *HPElineupMallItemClient) Update() *HPElineupMallItemUpdate
Update returns an update builder for HPElineupMallItem.
func (c *HPElineupMallItemClient) UpdateOne(hemi *HPElineupMallItem) *HPElineupMallItemUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *HPElineupMallItemClient) UpdateOneID(id int) *HPElineupMallItemUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *HPElineupMallItemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hpelineupmallitem.Hooks(f(g(h())))`.
HPElineupMallItemConnection is the connection containing edges to HPElineupMallItem.
type HPElineupMallItemConnection struct {
Edges []*HPElineupMallItemEdge `json:"edges"`
PageInfo PageInfo `json:"pageInfo"`
TotalCount int `json:"totalCount"`
}
HPElineupMallItemCreate is the builder for creating a HPElineupMallItem entity.
type HPElineupMallItemCreate struct {
// contains filtered or unexported fields
}
func (hemic *HPElineupMallItemCreate) AddTaggedArtistIDs(ids ...int) *HPElineupMallItemCreate
AddTaggedArtistIDs adds the "tagged_artists" edge to the HPArtist entity by IDs.
func (hemic *HPElineupMallItemCreate) AddTaggedArtists(h ...*HPArtist) *HPElineupMallItemCreate
AddTaggedArtists adds the "tagged_artists" edges to the HPArtist entity.
func (hemic *HPElineupMallItemCreate) AddTaggedMemberIDs(ids ...int) *HPElineupMallItemCreate
AddTaggedMemberIDs adds the "tagged_members" edge to the HPMember entity by IDs.
func (hemic *HPElineupMallItemCreate) AddTaggedMembers(h ...*HPMember) *HPElineupMallItemCreate
AddTaggedMembers adds the "tagged_members" edges to the HPMember entity.
func (hemic *HPElineupMallItemCreate) Exec(ctx context.Context) error
Exec executes the query.
func (hemic *HPElineupMallItemCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hemic *HPElineupMallItemCreate) Mutation() *HPElineupMallItemMutation
Mutation returns the HPElineupMallItemMutation object of the builder.
func (hemic *HPElineupMallItemCreate) OnConflict(opts ...sql.ConflictOption) *HPElineupMallItemUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPElineupMallItem.Create().
SetCrawledAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPElineupMallItemUpsert) {
SetCrawledAt(v+v).
}).
Exec(ctx)
func (hemic *HPElineupMallItemCreate) OnConflictColumns(columns ...string) *HPElineupMallItemUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPElineupMallItem.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hemic *HPElineupMallItemCreate) Save(ctx context.Context) (*HPElineupMallItem, error)
Save creates the HPElineupMallItem in the database.
func (hemic *HPElineupMallItemCreate) SaveX(ctx context.Context) *HPElineupMallItem
SaveX calls Save and panics if Save returns an error.
func (hemic *HPElineupMallItemCreate) SetCategory(eemic enums.HPElineupMallItemCategory) *HPElineupMallItemCreate
SetCategory sets the "category" field.
func (hemic *HPElineupMallItemCreate) SetCrawledAt(t time.Time) *HPElineupMallItemCreate
SetCrawledAt sets the "crawled_at" field.
func (hemic *HPElineupMallItemCreate) SetCreatedAt(t time.Time) *HPElineupMallItemCreate
SetCreatedAt sets the "created_at" field.
func (hemic *HPElineupMallItemCreate) SetDescription(s string) *HPElineupMallItemCreate
SetDescription sets the "description" field.
func (hemic *HPElineupMallItemCreate) SetErrorCount(i int) *HPElineupMallItemCreate
SetErrorCount sets the "error_count" field.
func (hemic *HPElineupMallItemCreate) SetImages(j []jsonfields.Media) *HPElineupMallItemCreate
SetImages sets the "images" field.
func (hemic *HPElineupMallItemCreate) SetIsLimitedToFc(b bool) *HPElineupMallItemCreate
SetIsLimitedToFc sets the "is_limited_to_fc" field.
func (hemic *HPElineupMallItemCreate) SetIsOutOfStock(b bool) *HPElineupMallItemCreate
SetIsOutOfStock sets the "is_out_of_stock" field.
func (hemic *HPElineupMallItemCreate) SetLastErrorMessage(s string) *HPElineupMallItemCreate
SetLastErrorMessage sets the "last_error_message" field.
func (hemic *HPElineupMallItemCreate) SetManuallyModified(jm *jsonfields.ManuallyModified) *HPElineupMallItemCreate
SetManuallyModified sets the "manually_modified" field.
func (hemic *HPElineupMallItemCreate) SetName(s string) *HPElineupMallItemCreate
SetName sets the "name" field.
func (hemic *HPElineupMallItemCreate) SetNillableCategory(eemic *enums.HPElineupMallItemCategory) *HPElineupMallItemCreate
SetNillableCategory sets the "category" field if the given value is not nil.
func (hemic *HPElineupMallItemCreate) SetNillableCrawledAt(t *time.Time) *HPElineupMallItemCreate
SetNillableCrawledAt sets the "crawled_at" field if the given value is not nil.
func (hemic *HPElineupMallItemCreate) SetNillableCreatedAt(t *time.Time) *HPElineupMallItemCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (hemic *HPElineupMallItemCreate) SetNillableDescription(s *string) *HPElineupMallItemCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (hemic *HPElineupMallItemCreate) SetNillableErrorCount(i *int) *HPElineupMallItemCreate
SetNillableErrorCount sets the "error_count" field if the given value is not nil.
func (hemic *HPElineupMallItemCreate) SetNillableLastErrorMessage(s *string) *HPElineupMallItemCreate
SetNillableLastErrorMessage sets the "last_error_message" field if the given value is not nil.
func (hemic *HPElineupMallItemCreate) SetNillableOrderEndAt(t *time.Time) *HPElineupMallItemCreate
SetNillableOrderEndAt sets the "order_end_at" field if the given value is not nil.
func (hemic *HPElineupMallItemCreate) SetNillableOrderStartAt(t *time.Time) *HPElineupMallItemCreate
SetNillableOrderStartAt sets the "order_start_at" field if the given value is not nil.
func (hemic *HPElineupMallItemCreate) SetNillableRecrawlRequired(b *bool) *HPElineupMallItemCreate
SetNillableRecrawlRequired sets the "recrawl_required" field if the given value is not nil.
func (hemic *HPElineupMallItemCreate) SetNillableUpdatedAt(t *time.Time) *HPElineupMallItemCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hemic *HPElineupMallItemCreate) SetOrderEndAt(t time.Time) *HPElineupMallItemCreate
SetOrderEndAt sets the "order_end_at" field.
func (hemic *HPElineupMallItemCreate) SetOrderStartAt(t time.Time) *HPElineupMallItemCreate
SetOrderStartAt sets the "order_start_at" field.
func (hemic *HPElineupMallItemCreate) SetPermalink(s string) *HPElineupMallItemCreate
SetPermalink sets the "permalink" field.
func (hemic *HPElineupMallItemCreate) SetPrice(i int) *HPElineupMallItemCreate
SetPrice sets the "price" field.
func (hemic *HPElineupMallItemCreate) SetRecrawlRequired(b bool) *HPElineupMallItemCreate
SetRecrawlRequired sets the "recrawl_required" field.
func (hemic *HPElineupMallItemCreate) SetSupplier(s string) *HPElineupMallItemCreate
SetSupplier sets the "supplier" field.
func (hemic *HPElineupMallItemCreate) SetUpdatedAt(t time.Time) *HPElineupMallItemCreate
SetUpdatedAt sets the "updated_at" field.
HPElineupMallItemCreateBulk is the builder for creating many HPElineupMallItem entities in bulk.
type HPElineupMallItemCreateBulk struct {
// contains filtered or unexported fields
}
func (hemicb *HPElineupMallItemCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (hemicb *HPElineupMallItemCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hemicb *HPElineupMallItemCreateBulk) OnConflict(opts ...sql.ConflictOption) *HPElineupMallItemUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPElineupMallItem.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPElineupMallItemUpsert) {
SetCrawledAt(v+v).
}).
Exec(ctx)
func (hemicb *HPElineupMallItemCreateBulk) OnConflictColumns(columns ...string) *HPElineupMallItemUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPElineupMallItem.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hemicb *HPElineupMallItemCreateBulk) Save(ctx context.Context) ([]*HPElineupMallItem, error)
Save creates the HPElineupMallItem entities in the database.
func (hemicb *HPElineupMallItemCreateBulk) SaveX(ctx context.Context) []*HPElineupMallItem
SaveX is like Save, but panics if an error occurs.
HPElineupMallItemDelete is the builder for deleting a HPElineupMallItem entity.
type HPElineupMallItemDelete struct {
// contains filtered or unexported fields
}
func (hemid *HPElineupMallItemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (hemid *HPElineupMallItemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (hemid *HPElineupMallItemDelete) Where(ps ...predicate.HPElineupMallItem) *HPElineupMallItemDelete
Where appends a list predicates to the HPElineupMallItemDelete builder.
HPElineupMallItemDeleteOne is the builder for deleting a single HPElineupMallItem entity.
type HPElineupMallItemDeleteOne struct {
// contains filtered or unexported fields
}
func (hemido *HPElineupMallItemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (hemido *HPElineupMallItemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hemido *HPElineupMallItemDeleteOne) Where(ps ...predicate.HPElineupMallItem) *HPElineupMallItemDeleteOne
Where appends a list predicates to the HPElineupMallItemDelete builder.
HPElineupMallItemEdge is the edge representation of HPElineupMallItem.
type HPElineupMallItemEdge struct {
Node *HPElineupMallItem `json:"node"`
Cursor Cursor `json:"cursor"`
}
HPElineupMallItemEdges holds the relations/edges for other nodes in the graph.
type HPElineupMallItemEdges struct {
// TaggedArtists holds the value of the tagged_artists edge.
TaggedArtists []*HPArtist `json:"tagged_artists,omitempty"`
// TaggedMembers holds the value of the tagged_members edge.
TaggedMembers []*HPMember `json:"tagged_members,omitempty"`
// contains filtered or unexported fields
}
func (e HPElineupMallItemEdges) TaggedArtistsOrErr() ([]*HPArtist, error)
TaggedArtistsOrErr returns the TaggedArtists value or an error if the edge was not loaded in eager-loading.
func (e HPElineupMallItemEdges) TaggedMembersOrErr() ([]*HPMember, error)
TaggedMembersOrErr returns the TaggedMembers value or an error if the edge was not loaded in eager-loading.
HPElineupMallItemFilter provides a generic filtering capability at runtime for HPElineupMallItemQuery.
type HPElineupMallItemFilter struct {
// contains filtered or unexported fields
}
func (f *HPElineupMallItemFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *HPElineupMallItemFilter) WhereCategory(p entql.StringP)
WhereCategory applies the entql string predicate on the category field.
func (f *HPElineupMallItemFilter) WhereCrawledAt(p entql.TimeP)
WhereCrawledAt applies the entql time.Time predicate on the crawled_at field.
func (f *HPElineupMallItemFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (f *HPElineupMallItemFilter) WhereDescription(p entql.StringP)
WhereDescription applies the entql string predicate on the description field.
func (f *HPElineupMallItemFilter) WhereErrorCount(p entql.IntP)
WhereErrorCount applies the entql int predicate on the error_count field.
func (f *HPElineupMallItemFilter) WhereHasTaggedArtists()
WhereHasTaggedArtists applies a predicate to check if query has an edge tagged_artists.
func (f *HPElineupMallItemFilter) WhereHasTaggedArtistsWith(preds ...predicate.HPArtist)
WhereHasTaggedArtistsWith applies a predicate to check if query has an edge tagged_artists with a given conditions (other predicates).
func (f *HPElineupMallItemFilter) WhereHasTaggedMembers()
WhereHasTaggedMembers applies a predicate to check if query has an edge tagged_members.
func (f *HPElineupMallItemFilter) WhereHasTaggedMembersWith(preds ...predicate.HPMember)
WhereHasTaggedMembersWith applies a predicate to check if query has an edge tagged_members with a given conditions (other predicates).
func (f *HPElineupMallItemFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *HPElineupMallItemFilter) WhereImages(p entql.BytesP)
WhereImages applies the entql json.RawMessage predicate on the images field.
func (f *HPElineupMallItemFilter) WhereIsLimitedToFc(p entql.BoolP)
WhereIsLimitedToFc applies the entql bool predicate on the is_limited_to_fc field.
func (f *HPElineupMallItemFilter) WhereIsOutOfStock(p entql.BoolP)
WhereIsOutOfStock applies the entql bool predicate on the is_out_of_stock field.
func (f *HPElineupMallItemFilter) WhereLastErrorMessage(p entql.StringP)
WhereLastErrorMessage applies the entql string predicate on the last_error_message field.
func (f *HPElineupMallItemFilter) WhereManuallyModified(p entql.BytesP)
WhereManuallyModified applies the entql json.RawMessage predicate on the manually_modified field.
func (f *HPElineupMallItemFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
func (f *HPElineupMallItemFilter) WhereOrderEndAt(p entql.TimeP)
WhereOrderEndAt applies the entql time.Time predicate on the order_end_at field.
func (f *HPElineupMallItemFilter) WhereOrderStartAt(p entql.TimeP)
WhereOrderStartAt applies the entql time.Time predicate on the order_start_at field.
func (f *HPElineupMallItemFilter) WherePermalink(p entql.StringP)
WherePermalink applies the entql string predicate on the permalink field.
func (f *HPElineupMallItemFilter) WherePrice(p entql.IntP)
WherePrice applies the entql int predicate on the price field.
func (f *HPElineupMallItemFilter) WhereRecrawlRequired(p entql.BoolP)
WhereRecrawlRequired applies the entql bool predicate on the recrawl_required field.
func (f *HPElineupMallItemFilter) WhereSupplier(p entql.StringP)
WhereSupplier applies the entql string predicate on the supplier field.
func (f *HPElineupMallItemFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
HPElineupMallItemGroupBy is the group-by builder for HPElineupMallItem entities.
type HPElineupMallItemGroupBy struct {
// contains filtered or unexported fields
}
func (hemigb *HPElineupMallItemGroupBy) Aggregate(fns ...AggregateFunc) *HPElineupMallItemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *HPElineupMallItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPElineupMallItemGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPElineupMallItemGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPElineupMallItemGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPElineupMallItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPElineupMallItemGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPElineupMallItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPElineupMallItemGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPElineupMallItemGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPElineupMallItemGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPElineupMallItemGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPElineupMallItemGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hemigb *HPElineupMallItemGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPElineupMallItemGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPElineupMallItemGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPElineupMallItemGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPElineupMallItemGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPElineupMallItemGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPElineupMallItemMutation represents an operation that mutates the HPElineupMallItem nodes in the graph.
type HPElineupMallItemMutation struct {
// contains filtered or unexported fields
}
func (m *HPElineupMallItemMutation) AddErrorCount(i int)
AddErrorCount adds i to the "error_count" field.
func (m *HPElineupMallItemMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPElineupMallItemMutation) AddPrice(i int)
AddPrice adds i to the "price" field.
func (m *HPElineupMallItemMutation) AddTaggedArtistIDs(ids ...int)
AddTaggedArtistIDs adds the "tagged_artists" edge to the HPArtist entity by ids.
func (m *HPElineupMallItemMutation) AddTaggedMemberIDs(ids ...int)
AddTaggedMemberIDs adds the "tagged_members" edge to the HPMember entity by ids.
func (m *HPElineupMallItemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *HPElineupMallItemMutation) AddedErrorCount() (r int, exists bool)
AddedErrorCount returns the value that was added to the "error_count" field in this mutation.
func (m *HPElineupMallItemMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPElineupMallItemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *HPElineupMallItemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *HPElineupMallItemMutation) AddedPrice() (r int, exists bool)
AddedPrice returns the value that was added to the "price" field in this mutation.
func (m *HPElineupMallItemMutation) AppendImages(j []jsonfields.Media)
AppendImages adds j to the "images" field.
func (m *HPElineupMallItemMutation) AppendedImages() ([]jsonfields.Media, bool)
AppendedImages returns the list of values that were appended to the "images" field in this mutation.
func (m *HPElineupMallItemMutation) Category() (r enums.HPElineupMallItemCategory, exists bool)
Category returns the value of the "category" field in the mutation.
func (m *HPElineupMallItemMutation) ClearCrawledAt()
ClearCrawledAt clears the value of the "crawled_at" field.
func (m *HPElineupMallItemMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (m *HPElineupMallItemMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *HPElineupMallItemMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPElineupMallItemMutation) ClearLastErrorMessage()
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (m *HPElineupMallItemMutation) ClearManuallyModified()
ClearManuallyModified clears the value of the "manually_modified" field.
func (m *HPElineupMallItemMutation) ClearOrderEndAt()
ClearOrderEndAt clears the value of the "order_end_at" field.
func (m *HPElineupMallItemMutation) ClearOrderStartAt()
ClearOrderStartAt clears the value of the "order_start_at" field.
func (m *HPElineupMallItemMutation) ClearRecrawlRequired()
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (m *HPElineupMallItemMutation) ClearTaggedArtists()
ClearTaggedArtists clears the "tagged_artists" edge to the HPArtist entity.
func (m *HPElineupMallItemMutation) ClearTaggedMembers()
ClearTaggedMembers clears the "tagged_members" edge to the HPMember entity.
func (m *HPElineupMallItemMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (m *HPElineupMallItemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *HPElineupMallItemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m HPElineupMallItemMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *HPElineupMallItemMutation) CrawledAt() (r time.Time, exists bool)
CrawledAt returns the value of the "crawled_at" field in the mutation.
func (m *HPElineupMallItemMutation) CrawledAtCleared() bool
CrawledAtCleared returns if the "crawled_at" field was cleared in this mutation.
func (m *HPElineupMallItemMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (m *HPElineupMallItemMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (m *HPElineupMallItemMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (m *HPElineupMallItemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *HPElineupMallItemMutation) ErrorCount() (r int, exists bool)
ErrorCount returns the value of the "error_count" field in the mutation.
func (m *HPElineupMallItemMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPElineupMallItemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *HPElineupMallItemMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *HPElineupMallItemMutation) Filter() *HPElineupMallItemFilter
Filter returns an entql.Where implementation to apply filters on the HPElineupMallItemMutation builder.
func (m *HPElineupMallItemMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *HPElineupMallItemMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *HPElineupMallItemMutation) Images() (r []jsonfields.Media, exists bool)
Images returns the value of the "images" field in the mutation.
func (m *HPElineupMallItemMutation) IsLimitedToFc() (r bool, exists bool)
IsLimitedToFc returns the value of the "is_limited_to_fc" field in the mutation.
func (m *HPElineupMallItemMutation) IsOutOfStock() (r bool, exists bool)
IsOutOfStock returns the value of the "is_out_of_stock" field in the mutation.
func (m *HPElineupMallItemMutation) LastErrorMessage() (r string, exists bool)
LastErrorMessage returns the value of the "last_error_message" field in the mutation.
func (m *HPElineupMallItemMutation) LastErrorMessageCleared() bool
LastErrorMessageCleared returns if the "last_error_message" field was cleared in this mutation.
func (m *HPElineupMallItemMutation) ManuallyModified() (r *jsonfields.ManuallyModified, exists bool)
ManuallyModified returns the value of the "manually_modified" field in the mutation.
func (m *HPElineupMallItemMutation) ManuallyModifiedCleared() bool
ManuallyModifiedCleared returns if the "manually_modified" field was cleared in this mutation.
func (m *HPElineupMallItemMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (m *HPElineupMallItemMutation) OldCategory(ctx context.Context) (v enums.HPElineupMallItemCategory, err error)
OldCategory returns the old "category" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldCrawledAt(ctx context.Context) (v *time.Time, err error)
OldCrawledAt returns the old "crawled_at" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
OldCreatedAt returns the old "created_at" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldErrorCount(ctx context.Context) (v int, err error)
OldErrorCount returns the old "error_count" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *HPElineupMallItemMutation) OldImages(ctx context.Context) (v []jsonfields.Media, err error)
OldImages returns the old "images" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldIsLimitedToFc(ctx context.Context) (v bool, err error)
OldIsLimitedToFc returns the old "is_limited_to_fc" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldIsOutOfStock(ctx context.Context) (v bool, err error)
OldIsOutOfStock returns the old "is_out_of_stock" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldLastErrorMessage(ctx context.Context) (v *string, err error)
OldLastErrorMessage returns the old "last_error_message" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldManuallyModified(ctx context.Context) (v *jsonfields.ManuallyModified, err error)
OldManuallyModified returns the old "manually_modified" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldOrderEndAt(ctx context.Context) (v *time.Time, err error)
OldOrderEndAt returns the old "order_end_at" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldOrderStartAt(ctx context.Context) (v *time.Time, err error)
OldOrderStartAt returns the old "order_start_at" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldPermalink(ctx context.Context) (v string, err error)
OldPermalink returns the old "permalink" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldPrice(ctx context.Context) (v int, err error)
OldPrice returns the old "price" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldRecrawlRequired(ctx context.Context) (v bool, err error)
OldRecrawlRequired returns the old "recrawl_required" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldSupplier(ctx context.Context) (v string, err error)
OldSupplier returns the old "supplier" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
OldUpdatedAt returns the old "updated_at" field's value of the HPElineupMallItem entity. If the HPElineupMallItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPElineupMallItemMutation) Op() Op
Op returns the operation name.
func (m *HPElineupMallItemMutation) OrderEndAt() (r time.Time, exists bool)
OrderEndAt returns the value of the "order_end_at" field in the mutation.
func (m *HPElineupMallItemMutation) OrderEndAtCleared() bool
OrderEndAtCleared returns if the "order_end_at" field was cleared in this mutation.
func (m *HPElineupMallItemMutation) OrderStartAt() (r time.Time, exists bool)
OrderStartAt returns the value of the "order_start_at" field in the mutation.
func (m *HPElineupMallItemMutation) OrderStartAtCleared() bool
OrderStartAtCleared returns if the "order_start_at" field was cleared in this mutation.
func (m *HPElineupMallItemMutation) Permalink() (r string, exists bool)
Permalink returns the value of the "permalink" field in the mutation.
func (m *HPElineupMallItemMutation) Price() (r int, exists bool)
Price returns the value of the "price" field in the mutation.
func (m *HPElineupMallItemMutation) RecrawlRequired() (r bool, exists bool)
RecrawlRequired returns the value of the "recrawl_required" field in the mutation.
func (m *HPElineupMallItemMutation) RecrawlRequiredCleared() bool
RecrawlRequiredCleared returns if the "recrawl_required" field was cleared in this mutation.
func (m *HPElineupMallItemMutation) RemoveTaggedArtistIDs(ids ...int)
RemoveTaggedArtistIDs removes the "tagged_artists" edge to the HPArtist entity by IDs.
func (m *HPElineupMallItemMutation) RemoveTaggedMemberIDs(ids ...int)
RemoveTaggedMemberIDs removes the "tagged_members" edge to the HPMember entity by IDs.
func (m *HPElineupMallItemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *HPElineupMallItemMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *HPElineupMallItemMutation) RemovedTaggedArtistsIDs() (ids []int)
RemovedTaggedArtists returns the removed IDs of the "tagged_artists" edge to the HPArtist entity.
func (m *HPElineupMallItemMutation) RemovedTaggedMembersIDs() (ids []int)
RemovedTaggedMembers returns the removed IDs of the "tagged_members" edge to the HPMember entity.
func (m *HPElineupMallItemMutation) ResetCategory()
ResetCategory resets all changes to the "category" field.
func (m *HPElineupMallItemMutation) ResetCrawledAt()
ResetCrawledAt resets all changes to the "crawled_at" field.
func (m *HPElineupMallItemMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (m *HPElineupMallItemMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (m *HPElineupMallItemMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *HPElineupMallItemMutation) ResetErrorCount()
ResetErrorCount resets all changes to the "error_count" field.
func (m *HPElineupMallItemMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPElineupMallItemMutation) ResetImages()
ResetImages resets all changes to the "images" field.
func (m *HPElineupMallItemMutation) ResetIsLimitedToFc()
ResetIsLimitedToFc resets all changes to the "is_limited_to_fc" field.
func (m *HPElineupMallItemMutation) ResetIsOutOfStock()
ResetIsOutOfStock resets all changes to the "is_out_of_stock" field.
func (m *HPElineupMallItemMutation) ResetLastErrorMessage()
ResetLastErrorMessage resets all changes to the "last_error_message" field.
func (m *HPElineupMallItemMutation) ResetManuallyModified()
ResetManuallyModified resets all changes to the "manually_modified" field.
func (m *HPElineupMallItemMutation) ResetName()
ResetName resets all changes to the "name" field.
func (m *HPElineupMallItemMutation) ResetOrderEndAt()
ResetOrderEndAt resets all changes to the "order_end_at" field.
func (m *HPElineupMallItemMutation) ResetOrderStartAt()
ResetOrderStartAt resets all changes to the "order_start_at" field.
func (m *HPElineupMallItemMutation) ResetPermalink()
ResetPermalink resets all changes to the "permalink" field.
func (m *HPElineupMallItemMutation) ResetPrice()
ResetPrice resets all changes to the "price" field.
func (m *HPElineupMallItemMutation) ResetRecrawlRequired()
ResetRecrawlRequired resets all changes to the "recrawl_required" field.
func (m *HPElineupMallItemMutation) ResetSupplier()
ResetSupplier resets all changes to the "supplier" field.
func (m *HPElineupMallItemMutation) ResetTaggedArtists()
ResetTaggedArtists resets all changes to the "tagged_artists" edge.
func (m *HPElineupMallItemMutation) ResetTaggedMembers()
ResetTaggedMembers resets all changes to the "tagged_members" edge.
func (m *HPElineupMallItemMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (m *HPElineupMallItemMutation) SetCategory(eemic enums.HPElineupMallItemCategory)
SetCategory sets the "category" field.
func (m *HPElineupMallItemMutation) SetCrawledAt(t time.Time)
SetCrawledAt sets the "crawled_at" field.
func (m *HPElineupMallItemMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (m *HPElineupMallItemMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (m *HPElineupMallItemMutation) SetErrorCount(i int)
SetErrorCount sets the "error_count" field.
func (m *HPElineupMallItemMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPElineupMallItemMutation) SetImages(j []jsonfields.Media)
SetImages sets the "images" field.
func (m *HPElineupMallItemMutation) SetIsLimitedToFc(b bool)
SetIsLimitedToFc sets the "is_limited_to_fc" field.
func (m *HPElineupMallItemMutation) SetIsOutOfStock(b bool)
SetIsOutOfStock sets the "is_out_of_stock" field.
func (m *HPElineupMallItemMutation) SetLastErrorMessage(s string)
SetLastErrorMessage sets the "last_error_message" field.
func (m *HPElineupMallItemMutation) SetManuallyModified(jm *jsonfields.ManuallyModified)
SetManuallyModified sets the "manually_modified" field.
func (m *HPElineupMallItemMutation) SetName(s string)
SetName sets the "name" field.
func (m *HPElineupMallItemMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *HPElineupMallItemMutation) SetOrderEndAt(t time.Time)
SetOrderEndAt sets the "order_end_at" field.
func (m *HPElineupMallItemMutation) SetOrderStartAt(t time.Time)
SetOrderStartAt sets the "order_start_at" field.
func (m *HPElineupMallItemMutation) SetPermalink(s string)
SetPermalink sets the "permalink" field.
func (m *HPElineupMallItemMutation) SetPrice(i int)
SetPrice sets the "price" field.
func (m *HPElineupMallItemMutation) SetRecrawlRequired(b bool)
SetRecrawlRequired sets the "recrawl_required" field.
func (m *HPElineupMallItemMutation) SetSupplier(s string)
SetSupplier sets the "supplier" field.
func (m *HPElineupMallItemMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (m *HPElineupMallItemMutation) Supplier() (r string, exists bool)
Supplier returns the value of the "supplier" field in the mutation.
func (m *HPElineupMallItemMutation) TaggedArtistsCleared() bool
TaggedArtistsCleared reports if the "tagged_artists" edge to the HPArtist entity was cleared.
func (m *HPElineupMallItemMutation) TaggedArtistsIDs() (ids []int)
TaggedArtistsIDs returns the "tagged_artists" edge IDs in the mutation.
func (m *HPElineupMallItemMutation) TaggedMembersCleared() bool
TaggedMembersCleared reports if the "tagged_members" edge to the HPMember entity was cleared.
func (m *HPElineupMallItemMutation) TaggedMembersIDs() (ids []int)
TaggedMembersIDs returns the "tagged_members" edge IDs in the mutation.
func (m HPElineupMallItemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *HPElineupMallItemMutation) Type() string
Type returns the node type of this mutation (HPElineupMallItem).
func (m *HPElineupMallItemMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (m *HPElineupMallItemMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (m *HPElineupMallItemMutation) Where(ps ...predicate.HPElineupMallItem)
Where appends a list predicates to the HPElineupMallItemMutation builder.
func (m *HPElineupMallItemMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HPElineupMallItemMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
HPElineupMallItemOrder defines the ordering of HPElineupMallItem.
type HPElineupMallItemOrder struct {
Direction OrderDirection `json:"direction"`
Field *HPElineupMallItemOrderField `json:"field"`
}
HPElineupMallItemOrderField defines the ordering field of HPElineupMallItem.
type HPElineupMallItemOrderField struct {
// contains filtered or unexported fields
}
HPElineupMallItemPaginateOption enables pagination customization.
type HPElineupMallItemPaginateOption func(*hpelineupmallitemPager) error
func WithHPElineupMallItemFilter(filter func(*HPElineupMallItemQuery) (*HPElineupMallItemQuery, error)) HPElineupMallItemPaginateOption
WithHPElineupMallItemFilter configures pagination filter.
func WithHPElineupMallItemOrder(order *HPElineupMallItemOrder) HPElineupMallItemPaginateOption
WithHPElineupMallItemOrder configures pagination ordering.
HPElineupMallItemQuery is the builder for querying HPElineupMallItem entities.
type HPElineupMallItemQuery struct {
// contains filtered or unexported fields
}
func (hemiq *HPElineupMallItemQuery) Aggregate(fns ...AggregateFunc) *HPElineupMallItemSelect
Aggregate returns a HPElineupMallItemSelect configured with the given aggregations.
func (hemiq *HPElineupMallItemQuery) All(ctx context.Context) ([]*HPElineupMallItem, error)
All executes the query and returns a list of HPElineupMallItems.
func (hemiq *HPElineupMallItemQuery) AllX(ctx context.Context) []*HPElineupMallItem
AllX is like All, but panics if an error occurs.
func (hemiq *HPElineupMallItemQuery) Clone() *HPElineupMallItemQuery
Clone returns a duplicate of the HPElineupMallItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (hemi *HPElineupMallItemQuery) CollectFields(ctx context.Context, satisfies ...string) (*HPElineupMallItemQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (hemiq *HPElineupMallItemQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (hemiq *HPElineupMallItemQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (hemiq *HPElineupMallItemQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (hemiq *HPElineupMallItemQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (hemiq *HPElineupMallItemQuery) Filter() *HPElineupMallItemFilter
Filter returns a Filter implementation to apply filters on the HPElineupMallItemQuery builder.
func (hemiq *HPElineupMallItemQuery) First(ctx context.Context) (*HPElineupMallItem, error)
First returns the first HPElineupMallItem entity from the query. Returns a *NotFoundError when no HPElineupMallItem was found.
func (hemiq *HPElineupMallItemQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first HPElineupMallItem ID from the query. Returns a *NotFoundError when no HPElineupMallItem ID was found.
func (hemiq *HPElineupMallItemQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (hemiq *HPElineupMallItemQuery) FirstX(ctx context.Context) *HPElineupMallItem
FirstX is like First, but panics if an error occurs.
func (hemiq *HPElineupMallItemQuery) GroupBy(field string, fields ...string) *HPElineupMallItemGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CrawledAt time.Time `json:"crawled_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.HPElineupMallItem.Query().
GroupBy(hpelineupmallitem.FieldCrawledAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (hemiq *HPElineupMallItemQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of HPElineupMallItem IDs.
func (hemiq *HPElineupMallItemQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (hemiq *HPElineupMallItemQuery) Limit(limit int) *HPElineupMallItemQuery
Limit the number of records to be returned by this query.
func (hemiq *HPElineupMallItemQuery) Offset(offset int) *HPElineupMallItemQuery
Offset to start from.
func (hemiq *HPElineupMallItemQuery) Only(ctx context.Context) (*HPElineupMallItem, error)
Only returns a single HPElineupMallItem entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HPElineupMallItem entity is found. Returns a *NotFoundError when no HPElineupMallItem entities are found.
func (hemiq *HPElineupMallItemQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only HPElineupMallItem ID in the query. Returns a *NotSingularError when more than one HPElineupMallItem ID is found. Returns a *NotFoundError when no entities are found.
func (hemiq *HPElineupMallItemQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (hemiq *HPElineupMallItemQuery) OnlyX(ctx context.Context) *HPElineupMallItem
OnlyX is like Only, but panics if an error occurs.
func (hemiq *HPElineupMallItemQuery) Order(o ...hpelineupmallitem.Order) *HPElineupMallItemQuery
Order specifies how the records should be ordered.
func (hemi *HPElineupMallItemQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...HPElineupMallItemPaginateOption, ) (*HPElineupMallItemConnection, error)
Paginate executes the query and returns a relay based cursor connection to HPElineupMallItem.
func (hemiq *HPElineupMallItemQuery) QueryTaggedArtists() *HPArtistQuery
QueryTaggedArtists chains the current query on the "tagged_artists" edge.
func (hemiq *HPElineupMallItemQuery) QueryTaggedMembers() *HPMemberQuery
QueryTaggedMembers chains the current query on the "tagged_members" edge.
func (hemiq *HPElineupMallItemQuery) Select(fields ...string) *HPElineupMallItemSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CrawledAt time.Time `json:"crawled_at,omitempty"`
}
client.HPElineupMallItem.Query().
Select(hpelineupmallitem.FieldCrawledAt).
Scan(ctx, &v)
func (hemiq *HPElineupMallItemQuery) Unique(unique bool) *HPElineupMallItemQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (hemiq *HPElineupMallItemQuery) Where(ps ...predicate.HPElineupMallItem) *HPElineupMallItemQuery
Where adds a new predicate for the HPElineupMallItemQuery builder.
func (hemiq *HPElineupMallItemQuery) WithNamedTaggedArtists(name string, opts ...func(*HPArtistQuery)) *HPElineupMallItemQuery
WithNamedTaggedArtists tells the query-builder to eager-load the nodes that are connected to the "tagged_artists" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hemiq *HPElineupMallItemQuery) WithNamedTaggedMembers(name string, opts ...func(*HPMemberQuery)) *HPElineupMallItemQuery
WithNamedTaggedMembers tells the query-builder to eager-load the nodes that are connected to the "tagged_members" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hemiq *HPElineupMallItemQuery) WithTaggedArtists(opts ...func(*HPArtistQuery)) *HPElineupMallItemQuery
WithTaggedArtists tells the query-builder to eager-load the nodes that are connected to the "tagged_artists" edge. The optional arguments are used to configure the query builder of the edge.
func (hemiq *HPElineupMallItemQuery) WithTaggedMembers(opts ...func(*HPMemberQuery)) *HPElineupMallItemQuery
WithTaggedMembers tells the query-builder to eager-load the nodes that are connected to the "tagged_members" edge. The optional arguments are used to configure the query builder of the edge.
HPElineupMallItemSelect is the builder for selecting fields of HPElineupMallItem entities.
type HPElineupMallItemSelect struct {
*HPElineupMallItemQuery
// contains filtered or unexported fields
}
func (hemis *HPElineupMallItemSelect) Aggregate(fns ...AggregateFunc) *HPElineupMallItemSelect
Aggregate adds the given aggregation functions to the selector query.
func (s *HPElineupMallItemSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPElineupMallItemSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPElineupMallItemSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPElineupMallItemSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPElineupMallItemSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPElineupMallItemSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPElineupMallItemSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPElineupMallItemSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPElineupMallItemSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPElineupMallItemSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPElineupMallItemSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPElineupMallItemSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hemis *HPElineupMallItemSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPElineupMallItemSelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPElineupMallItemSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPElineupMallItemSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPElineupMallItemSelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPElineupMallItemSelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPElineupMallItemUpdate is the builder for updating HPElineupMallItem entities.
type HPElineupMallItemUpdate struct {
// contains filtered or unexported fields
}
func (hemiu *HPElineupMallItemUpdate) AddErrorCount(i int) *HPElineupMallItemUpdate
AddErrorCount adds i to the "error_count" field.
func (hemiu *HPElineupMallItemUpdate) AddPrice(i int) *HPElineupMallItemUpdate
AddPrice adds i to the "price" field.
func (hemiu *HPElineupMallItemUpdate) AddTaggedArtistIDs(ids ...int) *HPElineupMallItemUpdate
AddTaggedArtistIDs adds the "tagged_artists" edge to the HPArtist entity by IDs.
func (hemiu *HPElineupMallItemUpdate) AddTaggedArtists(h ...*HPArtist) *HPElineupMallItemUpdate
AddTaggedArtists adds the "tagged_artists" edges to the HPArtist entity.
func (hemiu *HPElineupMallItemUpdate) AddTaggedMemberIDs(ids ...int) *HPElineupMallItemUpdate
AddTaggedMemberIDs adds the "tagged_members" edge to the HPMember entity by IDs.
func (hemiu *HPElineupMallItemUpdate) AddTaggedMembers(h ...*HPMember) *HPElineupMallItemUpdate
AddTaggedMembers adds the "tagged_members" edges to the HPMember entity.
func (hemiu *HPElineupMallItemUpdate) AppendImages(j []jsonfields.Media) *HPElineupMallItemUpdate
AppendImages appends j to the "images" field.
func (hemiu *HPElineupMallItemUpdate) ClearCrawledAt() *HPElineupMallItemUpdate
ClearCrawledAt clears the value of the "crawled_at" field.
func (hemiu *HPElineupMallItemUpdate) ClearLastErrorMessage() *HPElineupMallItemUpdate
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (hemiu *HPElineupMallItemUpdate) ClearManuallyModified() *HPElineupMallItemUpdate
ClearManuallyModified clears the value of the "manually_modified" field.
func (hemiu *HPElineupMallItemUpdate) ClearOrderEndAt() *HPElineupMallItemUpdate
ClearOrderEndAt clears the value of the "order_end_at" field.
func (hemiu *HPElineupMallItemUpdate) ClearOrderStartAt() *HPElineupMallItemUpdate
ClearOrderStartAt clears the value of the "order_start_at" field.
func (hemiu *HPElineupMallItemUpdate) ClearRecrawlRequired() *HPElineupMallItemUpdate
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (hemiu *HPElineupMallItemUpdate) ClearTaggedArtists() *HPElineupMallItemUpdate
ClearTaggedArtists clears all "tagged_artists" edges to the HPArtist entity.
func (hemiu *HPElineupMallItemUpdate) ClearTaggedMembers() *HPElineupMallItemUpdate
ClearTaggedMembers clears all "tagged_members" edges to the HPMember entity.
func (hemiu *HPElineupMallItemUpdate) ClearUpdatedAt() *HPElineupMallItemUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (hemiu *HPElineupMallItemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (hemiu *HPElineupMallItemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hemiu *HPElineupMallItemUpdate) Mutation() *HPElineupMallItemMutation
Mutation returns the HPElineupMallItemMutation object of the builder.
func (hemiu *HPElineupMallItemUpdate) RemoveTaggedArtistIDs(ids ...int) *HPElineupMallItemUpdate
RemoveTaggedArtistIDs removes the "tagged_artists" edge to HPArtist entities by IDs.
func (hemiu *HPElineupMallItemUpdate) RemoveTaggedArtists(h ...*HPArtist) *HPElineupMallItemUpdate
RemoveTaggedArtists removes "tagged_artists" edges to HPArtist entities.
func (hemiu *HPElineupMallItemUpdate) RemoveTaggedMemberIDs(ids ...int) *HPElineupMallItemUpdate
RemoveTaggedMemberIDs removes the "tagged_members" edge to HPMember entities by IDs.
func (hemiu *HPElineupMallItemUpdate) RemoveTaggedMembers(h ...*HPMember) *HPElineupMallItemUpdate
RemoveTaggedMembers removes "tagged_members" edges to HPMember entities.
func (hemiu *HPElineupMallItemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (hemiu *HPElineupMallItemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (hemiu *HPElineupMallItemUpdate) SetCategory(eemic enums.HPElineupMallItemCategory) *HPElineupMallItemUpdate
SetCategory sets the "category" field.
func (hemiu *HPElineupMallItemUpdate) SetCrawledAt(t time.Time) *HPElineupMallItemUpdate
SetCrawledAt sets the "crawled_at" field.
func (hemiu *HPElineupMallItemUpdate) SetDescription(s string) *HPElineupMallItemUpdate
SetDescription sets the "description" field.
func (hemiu *HPElineupMallItemUpdate) SetErrorCount(i int) *HPElineupMallItemUpdate
SetErrorCount sets the "error_count" field.
func (hemiu *HPElineupMallItemUpdate) SetImages(j []jsonfields.Media) *HPElineupMallItemUpdate
SetImages sets the "images" field.
func (hemiu *HPElineupMallItemUpdate) SetIsLimitedToFc(b bool) *HPElineupMallItemUpdate
SetIsLimitedToFc sets the "is_limited_to_fc" field.
func (hemiu *HPElineupMallItemUpdate) SetIsOutOfStock(b bool) *HPElineupMallItemUpdate
SetIsOutOfStock sets the "is_out_of_stock" field.
func (hemiu *HPElineupMallItemUpdate) SetLastErrorMessage(s string) *HPElineupMallItemUpdate
SetLastErrorMessage sets the "last_error_message" field.
func (hemiu *HPElineupMallItemUpdate) SetManuallyModified(jm *jsonfields.ManuallyModified) *HPElineupMallItemUpdate
SetManuallyModified sets the "manually_modified" field.
func (hemiu *HPElineupMallItemUpdate) SetName(s string) *HPElineupMallItemUpdate
SetName sets the "name" field.
func (hemiu *HPElineupMallItemUpdate) SetNillableCategory(eemic *enums.HPElineupMallItemCategory) *HPElineupMallItemUpdate
SetNillableCategory sets the "category" field if the given value is not nil.
func (hemiu *HPElineupMallItemUpdate) SetNillableCrawledAt(t *time.Time) *HPElineupMallItemUpdate
SetNillableCrawledAt sets the "crawled_at" field if the given value is not nil.
func (hemiu *HPElineupMallItemUpdate) SetNillableDescription(s *string) *HPElineupMallItemUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (hemiu *HPElineupMallItemUpdate) SetNillableErrorCount(i *int) *HPElineupMallItemUpdate
SetNillableErrorCount sets the "error_count" field if the given value is not nil.
func (hemiu *HPElineupMallItemUpdate) SetNillableLastErrorMessage(s *string) *HPElineupMallItemUpdate
SetNillableLastErrorMessage sets the "last_error_message" field if the given value is not nil.
func (hemiu *HPElineupMallItemUpdate) SetNillableOrderEndAt(t *time.Time) *HPElineupMallItemUpdate
SetNillableOrderEndAt sets the "order_end_at" field if the given value is not nil.
func (hemiu *HPElineupMallItemUpdate) SetNillableOrderStartAt(t *time.Time) *HPElineupMallItemUpdate
SetNillableOrderStartAt sets the "order_start_at" field if the given value is not nil.
func (hemiu *HPElineupMallItemUpdate) SetNillableRecrawlRequired(b *bool) *HPElineupMallItemUpdate
SetNillableRecrawlRequired sets the "recrawl_required" field if the given value is not nil.
func (hemiu *HPElineupMallItemUpdate) SetNillableUpdatedAt(t *time.Time) *HPElineupMallItemUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hemiu *HPElineupMallItemUpdate) SetOrderEndAt(t time.Time) *HPElineupMallItemUpdate
SetOrderEndAt sets the "order_end_at" field.
func (hemiu *HPElineupMallItemUpdate) SetOrderStartAt(t time.Time) *HPElineupMallItemUpdate
SetOrderStartAt sets the "order_start_at" field.
func (hemiu *HPElineupMallItemUpdate) SetPermalink(s string) *HPElineupMallItemUpdate
SetPermalink sets the "permalink" field.
func (hemiu *HPElineupMallItemUpdate) SetPrice(i int) *HPElineupMallItemUpdate
SetPrice sets the "price" field.
func (hemiu *HPElineupMallItemUpdate) SetRecrawlRequired(b bool) *HPElineupMallItemUpdate
SetRecrawlRequired sets the "recrawl_required" field.
func (hemiu *HPElineupMallItemUpdate) SetSupplier(s string) *HPElineupMallItemUpdate
SetSupplier sets the "supplier" field.
func (hemiu *HPElineupMallItemUpdate) SetUpdatedAt(t time.Time) *HPElineupMallItemUpdate
SetUpdatedAt sets the "updated_at" field.
func (hemiu *HPElineupMallItemUpdate) Where(ps ...predicate.HPElineupMallItem) *HPElineupMallItemUpdate
Where appends a list predicates to the HPElineupMallItemUpdate builder.
HPElineupMallItemUpdateOne is the builder for updating a single HPElineupMallItem entity.
type HPElineupMallItemUpdateOne struct {
// contains filtered or unexported fields
}
func (hemiuo *HPElineupMallItemUpdateOne) AddErrorCount(i int) *HPElineupMallItemUpdateOne
AddErrorCount adds i to the "error_count" field.
func (hemiuo *HPElineupMallItemUpdateOne) AddPrice(i int) *HPElineupMallItemUpdateOne
AddPrice adds i to the "price" field.
func (hemiuo *HPElineupMallItemUpdateOne) AddTaggedArtistIDs(ids ...int) *HPElineupMallItemUpdateOne
AddTaggedArtistIDs adds the "tagged_artists" edge to the HPArtist entity by IDs.
func (hemiuo *HPElineupMallItemUpdateOne) AddTaggedArtists(h ...*HPArtist) *HPElineupMallItemUpdateOne
AddTaggedArtists adds the "tagged_artists" edges to the HPArtist entity.
func (hemiuo *HPElineupMallItemUpdateOne) AddTaggedMemberIDs(ids ...int) *HPElineupMallItemUpdateOne
AddTaggedMemberIDs adds the "tagged_members" edge to the HPMember entity by IDs.
func (hemiuo *HPElineupMallItemUpdateOne) AddTaggedMembers(h ...*HPMember) *HPElineupMallItemUpdateOne
AddTaggedMembers adds the "tagged_members" edges to the HPMember entity.
func (hemiuo *HPElineupMallItemUpdateOne) AppendImages(j []jsonfields.Media) *HPElineupMallItemUpdateOne
AppendImages appends j to the "images" field.
func (hemiuo *HPElineupMallItemUpdateOne) ClearCrawledAt() *HPElineupMallItemUpdateOne
ClearCrawledAt clears the value of the "crawled_at" field.
func (hemiuo *HPElineupMallItemUpdateOne) ClearLastErrorMessage() *HPElineupMallItemUpdateOne
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (hemiuo *HPElineupMallItemUpdateOne) ClearManuallyModified() *HPElineupMallItemUpdateOne
ClearManuallyModified clears the value of the "manually_modified" field.
func (hemiuo *HPElineupMallItemUpdateOne) ClearOrderEndAt() *HPElineupMallItemUpdateOne
ClearOrderEndAt clears the value of the "order_end_at" field.
func (hemiuo *HPElineupMallItemUpdateOne) ClearOrderStartAt() *HPElineupMallItemUpdateOne
ClearOrderStartAt clears the value of the "order_start_at" field.
func (hemiuo *HPElineupMallItemUpdateOne) ClearRecrawlRequired() *HPElineupMallItemUpdateOne
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (hemiuo *HPElineupMallItemUpdateOne) ClearTaggedArtists() *HPElineupMallItemUpdateOne
ClearTaggedArtists clears all "tagged_artists" edges to the HPArtist entity.
func (hemiuo *HPElineupMallItemUpdateOne) ClearTaggedMembers() *HPElineupMallItemUpdateOne
ClearTaggedMembers clears all "tagged_members" edges to the HPMember entity.
func (hemiuo *HPElineupMallItemUpdateOne) ClearUpdatedAt() *HPElineupMallItemUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (hemiuo *HPElineupMallItemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (hemiuo *HPElineupMallItemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hemiuo *HPElineupMallItemUpdateOne) Mutation() *HPElineupMallItemMutation
Mutation returns the HPElineupMallItemMutation object of the builder.
func (hemiuo *HPElineupMallItemUpdateOne) RemoveTaggedArtistIDs(ids ...int) *HPElineupMallItemUpdateOne
RemoveTaggedArtistIDs removes the "tagged_artists" edge to HPArtist entities by IDs.
func (hemiuo *HPElineupMallItemUpdateOne) RemoveTaggedArtists(h ...*HPArtist) *HPElineupMallItemUpdateOne
RemoveTaggedArtists removes "tagged_artists" edges to HPArtist entities.
func (hemiuo *HPElineupMallItemUpdateOne) RemoveTaggedMemberIDs(ids ...int) *HPElineupMallItemUpdateOne
RemoveTaggedMemberIDs removes the "tagged_members" edge to HPMember entities by IDs.
func (hemiuo *HPElineupMallItemUpdateOne) RemoveTaggedMembers(h ...*HPMember) *HPElineupMallItemUpdateOne
RemoveTaggedMembers removes "tagged_members" edges to HPMember entities.
func (hemiuo *HPElineupMallItemUpdateOne) Save(ctx context.Context) (*HPElineupMallItem, error)
Save executes the query and returns the updated HPElineupMallItem entity.
func (hemiuo *HPElineupMallItemUpdateOne) SaveX(ctx context.Context) *HPElineupMallItem
SaveX is like Save, but panics if an error occurs.
func (hemiuo *HPElineupMallItemUpdateOne) Select(field string, fields ...string) *HPElineupMallItemUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (hemiuo *HPElineupMallItemUpdateOne) SetCategory(eemic enums.HPElineupMallItemCategory) *HPElineupMallItemUpdateOne
SetCategory sets the "category" field.
func (hemiuo *HPElineupMallItemUpdateOne) SetCrawledAt(t time.Time) *HPElineupMallItemUpdateOne
SetCrawledAt sets the "crawled_at" field.
func (hemiuo *HPElineupMallItemUpdateOne) SetDescription(s string) *HPElineupMallItemUpdateOne
SetDescription sets the "description" field.
func (hemiuo *HPElineupMallItemUpdateOne) SetErrorCount(i int) *HPElineupMallItemUpdateOne
SetErrorCount sets the "error_count" field.
func (hemiuo *HPElineupMallItemUpdateOne) SetImages(j []jsonfields.Media) *HPElineupMallItemUpdateOne
SetImages sets the "images" field.
func (hemiuo *HPElineupMallItemUpdateOne) SetIsLimitedToFc(b bool) *HPElineupMallItemUpdateOne
SetIsLimitedToFc sets the "is_limited_to_fc" field.
func (hemiuo *HPElineupMallItemUpdateOne) SetIsOutOfStock(b bool) *HPElineupMallItemUpdateOne
SetIsOutOfStock sets the "is_out_of_stock" field.
func (hemiuo *HPElineupMallItemUpdateOne) SetLastErrorMessage(s string) *HPElineupMallItemUpdateOne
SetLastErrorMessage sets the "last_error_message" field.
func (hemiuo *HPElineupMallItemUpdateOne) SetManuallyModified(jm *jsonfields.ManuallyModified) *HPElineupMallItemUpdateOne
SetManuallyModified sets the "manually_modified" field.
func (hemiuo *HPElineupMallItemUpdateOne) SetName(s string) *HPElineupMallItemUpdateOne
SetName sets the "name" field.
func (hemiuo *HPElineupMallItemUpdateOne) SetNillableCategory(eemic *enums.HPElineupMallItemCategory) *HPElineupMallItemUpdateOne
SetNillableCategory sets the "category" field if the given value is not nil.
func (hemiuo *HPElineupMallItemUpdateOne) SetNillableCrawledAt(t *time.Time) *HPElineupMallItemUpdateOne
SetNillableCrawledAt sets the "crawled_at" field if the given value is not nil.
func (hemiuo *HPElineupMallItemUpdateOne) SetNillableDescription(s *string) *HPElineupMallItemUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (hemiuo *HPElineupMallItemUpdateOne) SetNillableErrorCount(i *int) *HPElineupMallItemUpdateOne
SetNillableErrorCount sets the "error_count" field if the given value is not nil.
func (hemiuo *HPElineupMallItemUpdateOne) SetNillableLastErrorMessage(s *string) *HPElineupMallItemUpdateOne
SetNillableLastErrorMessage sets the "last_error_message" field if the given value is not nil.
func (hemiuo *HPElineupMallItemUpdateOne) SetNillableOrderEndAt(t *time.Time) *HPElineupMallItemUpdateOne
SetNillableOrderEndAt sets the "order_end_at" field if the given value is not nil.
func (hemiuo *HPElineupMallItemUpdateOne) SetNillableOrderStartAt(t *time.Time) *HPElineupMallItemUpdateOne
SetNillableOrderStartAt sets the "order_start_at" field if the given value is not nil.
func (hemiuo *HPElineupMallItemUpdateOne) SetNillableRecrawlRequired(b *bool) *HPElineupMallItemUpdateOne
SetNillableRecrawlRequired sets the "recrawl_required" field if the given value is not nil.
func (hemiuo *HPElineupMallItemUpdateOne) SetNillableUpdatedAt(t *time.Time) *HPElineupMallItemUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hemiuo *HPElineupMallItemUpdateOne) SetOrderEndAt(t time.Time) *HPElineupMallItemUpdateOne
SetOrderEndAt sets the "order_end_at" field.
func (hemiuo *HPElineupMallItemUpdateOne) SetOrderStartAt(t time.Time) *HPElineupMallItemUpdateOne
SetOrderStartAt sets the "order_start_at" field.
func (hemiuo *HPElineupMallItemUpdateOne) SetPermalink(s string) *HPElineupMallItemUpdateOne
SetPermalink sets the "permalink" field.
func (hemiuo *HPElineupMallItemUpdateOne) SetPrice(i int) *HPElineupMallItemUpdateOne
SetPrice sets the "price" field.
func (hemiuo *HPElineupMallItemUpdateOne) SetRecrawlRequired(b bool) *HPElineupMallItemUpdateOne
SetRecrawlRequired sets the "recrawl_required" field.
func (hemiuo *HPElineupMallItemUpdateOne) SetSupplier(s string) *HPElineupMallItemUpdateOne
SetSupplier sets the "supplier" field.
func (hemiuo *HPElineupMallItemUpdateOne) SetUpdatedAt(t time.Time) *HPElineupMallItemUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (hemiuo *HPElineupMallItemUpdateOne) Where(ps ...predicate.HPElineupMallItem) *HPElineupMallItemUpdateOne
Where appends a list predicates to the HPElineupMallItemUpdate builder.
HPElineupMallItemUpsert is the "OnConflict" setter.
type HPElineupMallItemUpsert struct {
*sql.UpdateSet
}
func (u *HPElineupMallItemUpsert) AddErrorCount(v int) *HPElineupMallItemUpsert
AddErrorCount adds v to the "error_count" field.
func (u *HPElineupMallItemUpsert) AddPrice(v int) *HPElineupMallItemUpsert
AddPrice adds v to the "price" field.
func (u *HPElineupMallItemUpsert) ClearCrawledAt() *HPElineupMallItemUpsert
ClearCrawledAt clears the value of the "crawled_at" field.
func (u *HPElineupMallItemUpsert) ClearLastErrorMessage() *HPElineupMallItemUpsert
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (u *HPElineupMallItemUpsert) ClearManuallyModified() *HPElineupMallItemUpsert
ClearManuallyModified clears the value of the "manually_modified" field.
func (u *HPElineupMallItemUpsert) ClearOrderEndAt() *HPElineupMallItemUpsert
ClearOrderEndAt clears the value of the "order_end_at" field.
func (u *HPElineupMallItemUpsert) ClearOrderStartAt() *HPElineupMallItemUpsert
ClearOrderStartAt clears the value of the "order_start_at" field.
func (u *HPElineupMallItemUpsert) ClearRecrawlRequired() *HPElineupMallItemUpsert
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (u *HPElineupMallItemUpsert) ClearUpdatedAt() *HPElineupMallItemUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPElineupMallItemUpsert) SetCategory(v enums.HPElineupMallItemCategory) *HPElineupMallItemUpsert
SetCategory sets the "category" field.
func (u *HPElineupMallItemUpsert) SetCrawledAt(v time.Time) *HPElineupMallItemUpsert
SetCrawledAt sets the "crawled_at" field.
func (u *HPElineupMallItemUpsert) SetDescription(v string) *HPElineupMallItemUpsert
SetDescription sets the "description" field.
func (u *HPElineupMallItemUpsert) SetErrorCount(v int) *HPElineupMallItemUpsert
SetErrorCount sets the "error_count" field.
func (u *HPElineupMallItemUpsert) SetImages(v []jsonfields.Media) *HPElineupMallItemUpsert
SetImages sets the "images" field.
func (u *HPElineupMallItemUpsert) SetIsLimitedToFc(v bool) *HPElineupMallItemUpsert
SetIsLimitedToFc sets the "is_limited_to_fc" field.
func (u *HPElineupMallItemUpsert) SetIsOutOfStock(v bool) *HPElineupMallItemUpsert
SetIsOutOfStock sets the "is_out_of_stock" field.
func (u *HPElineupMallItemUpsert) SetLastErrorMessage(v string) *HPElineupMallItemUpsert
SetLastErrorMessage sets the "last_error_message" field.
func (u *HPElineupMallItemUpsert) SetManuallyModified(v *jsonfields.ManuallyModified) *HPElineupMallItemUpsert
SetManuallyModified sets the "manually_modified" field.
func (u *HPElineupMallItemUpsert) SetName(v string) *HPElineupMallItemUpsert
SetName sets the "name" field.
func (u *HPElineupMallItemUpsert) SetOrderEndAt(v time.Time) *HPElineupMallItemUpsert
SetOrderEndAt sets the "order_end_at" field.
func (u *HPElineupMallItemUpsert) SetOrderStartAt(v time.Time) *HPElineupMallItemUpsert
SetOrderStartAt sets the "order_start_at" field.
func (u *HPElineupMallItemUpsert) SetPermalink(v string) *HPElineupMallItemUpsert
SetPermalink sets the "permalink" field.
func (u *HPElineupMallItemUpsert) SetPrice(v int) *HPElineupMallItemUpsert
SetPrice sets the "price" field.
func (u *HPElineupMallItemUpsert) SetRecrawlRequired(v bool) *HPElineupMallItemUpsert
SetRecrawlRequired sets the "recrawl_required" field.
func (u *HPElineupMallItemUpsert) SetSupplier(v string) *HPElineupMallItemUpsert
SetSupplier sets the "supplier" field.
func (u *HPElineupMallItemUpsert) SetUpdatedAt(v time.Time) *HPElineupMallItemUpsert
SetUpdatedAt sets the "updated_at" field.
func (u *HPElineupMallItemUpsert) UpdateCategory() *HPElineupMallItemUpsert
UpdateCategory sets the "category" field to the value that was provided on create.
func (u *HPElineupMallItemUpsert) UpdateCrawledAt() *HPElineupMallItemUpsert
UpdateCrawledAt sets the "crawled_at" field to the value that was provided on create.
func (u *HPElineupMallItemUpsert) UpdateDescription() *HPElineupMallItemUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (u *HPElineupMallItemUpsert) UpdateErrorCount() *HPElineupMallItemUpsert
UpdateErrorCount sets the "error_count" field to the value that was provided on create.
func (u *HPElineupMallItemUpsert) UpdateImages() *HPElineupMallItemUpsert
UpdateImages sets the "images" field to the value that was provided on create.
func (u *HPElineupMallItemUpsert) UpdateIsLimitedToFc() *HPElineupMallItemUpsert
UpdateIsLimitedToFc sets the "is_limited_to_fc" field to the value that was provided on create.
func (u *HPElineupMallItemUpsert) UpdateIsOutOfStock() *HPElineupMallItemUpsert
UpdateIsOutOfStock sets the "is_out_of_stock" field to the value that was provided on create.
func (u *HPElineupMallItemUpsert) UpdateLastErrorMessage() *HPElineupMallItemUpsert
UpdateLastErrorMessage sets the "last_error_message" field to the value that was provided on create.
func (u *HPElineupMallItemUpsert) UpdateManuallyModified() *HPElineupMallItemUpsert
UpdateManuallyModified sets the "manually_modified" field to the value that was provided on create.
func (u *HPElineupMallItemUpsert) UpdateName() *HPElineupMallItemUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (u *HPElineupMallItemUpsert) UpdateOrderEndAt() *HPElineupMallItemUpsert
UpdateOrderEndAt sets the "order_end_at" field to the value that was provided on create.
func (u *HPElineupMallItemUpsert) UpdateOrderStartAt() *HPElineupMallItemUpsert
UpdateOrderStartAt sets the "order_start_at" field to the value that was provided on create.
func (u *HPElineupMallItemUpsert) UpdatePermalink() *HPElineupMallItemUpsert
UpdatePermalink sets the "permalink" field to the value that was provided on create.
func (u *HPElineupMallItemUpsert) UpdatePrice() *HPElineupMallItemUpsert
UpdatePrice sets the "price" field to the value that was provided on create.
func (u *HPElineupMallItemUpsert) UpdateRecrawlRequired() *HPElineupMallItemUpsert
UpdateRecrawlRequired sets the "recrawl_required" field to the value that was provided on create.
func (u *HPElineupMallItemUpsert) UpdateSupplier() *HPElineupMallItemUpsert
UpdateSupplier sets the "supplier" field to the value that was provided on create.
func (u *HPElineupMallItemUpsert) UpdateUpdatedAt() *HPElineupMallItemUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPElineupMallItemUpsertBulk is the builder for "upsert"-ing a bulk of HPElineupMallItem nodes.
type HPElineupMallItemUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *HPElineupMallItemUpsertBulk) AddErrorCount(v int) *HPElineupMallItemUpsertBulk
AddErrorCount adds v to the "error_count" field.
func (u *HPElineupMallItemUpsertBulk) AddPrice(v int) *HPElineupMallItemUpsertBulk
AddPrice adds v to the "price" field.
func (u *HPElineupMallItemUpsertBulk) ClearCrawledAt() *HPElineupMallItemUpsertBulk
ClearCrawledAt clears the value of the "crawled_at" field.
func (u *HPElineupMallItemUpsertBulk) ClearLastErrorMessage() *HPElineupMallItemUpsertBulk
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (u *HPElineupMallItemUpsertBulk) ClearManuallyModified() *HPElineupMallItemUpsertBulk
ClearManuallyModified clears the value of the "manually_modified" field.
func (u *HPElineupMallItemUpsertBulk) ClearOrderEndAt() *HPElineupMallItemUpsertBulk
ClearOrderEndAt clears the value of the "order_end_at" field.
func (u *HPElineupMallItemUpsertBulk) ClearOrderStartAt() *HPElineupMallItemUpsertBulk
ClearOrderStartAt clears the value of the "order_start_at" field.
func (u *HPElineupMallItemUpsertBulk) ClearRecrawlRequired() *HPElineupMallItemUpsertBulk
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (u *HPElineupMallItemUpsertBulk) ClearUpdatedAt() *HPElineupMallItemUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPElineupMallItemUpsertBulk) DoNothing() *HPElineupMallItemUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPElineupMallItemUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPElineupMallItemUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPElineupMallItemUpsertBulk) Ignore() *HPElineupMallItemUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPElineupMallItem.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *HPElineupMallItemUpsertBulk) SetCategory(v enums.HPElineupMallItemCategory) *HPElineupMallItemUpsertBulk
SetCategory sets the "category" field.
func (u *HPElineupMallItemUpsertBulk) SetCrawledAt(v time.Time) *HPElineupMallItemUpsertBulk
SetCrawledAt sets the "crawled_at" field.
func (u *HPElineupMallItemUpsertBulk) SetDescription(v string) *HPElineupMallItemUpsertBulk
SetDescription sets the "description" field.
func (u *HPElineupMallItemUpsertBulk) SetErrorCount(v int) *HPElineupMallItemUpsertBulk
SetErrorCount sets the "error_count" field.
func (u *HPElineupMallItemUpsertBulk) SetImages(v []jsonfields.Media) *HPElineupMallItemUpsertBulk
SetImages sets the "images" field.
func (u *HPElineupMallItemUpsertBulk) SetIsLimitedToFc(v bool) *HPElineupMallItemUpsertBulk
SetIsLimitedToFc sets the "is_limited_to_fc" field.
func (u *HPElineupMallItemUpsertBulk) SetIsOutOfStock(v bool) *HPElineupMallItemUpsertBulk
SetIsOutOfStock sets the "is_out_of_stock" field.
func (u *HPElineupMallItemUpsertBulk) SetLastErrorMessage(v string) *HPElineupMallItemUpsertBulk
SetLastErrorMessage sets the "last_error_message" field.
func (u *HPElineupMallItemUpsertBulk) SetManuallyModified(v *jsonfields.ManuallyModified) *HPElineupMallItemUpsertBulk
SetManuallyModified sets the "manually_modified" field.
func (u *HPElineupMallItemUpsertBulk) SetName(v string) *HPElineupMallItemUpsertBulk
SetName sets the "name" field.
func (u *HPElineupMallItemUpsertBulk) SetOrderEndAt(v time.Time) *HPElineupMallItemUpsertBulk
SetOrderEndAt sets the "order_end_at" field.
func (u *HPElineupMallItemUpsertBulk) SetOrderStartAt(v time.Time) *HPElineupMallItemUpsertBulk
SetOrderStartAt sets the "order_start_at" field.
func (u *HPElineupMallItemUpsertBulk) SetPermalink(v string) *HPElineupMallItemUpsertBulk
SetPermalink sets the "permalink" field.
func (u *HPElineupMallItemUpsertBulk) SetPrice(v int) *HPElineupMallItemUpsertBulk
SetPrice sets the "price" field.
func (u *HPElineupMallItemUpsertBulk) SetRecrawlRequired(v bool) *HPElineupMallItemUpsertBulk
SetRecrawlRequired sets the "recrawl_required" field.
func (u *HPElineupMallItemUpsertBulk) SetSupplier(v string) *HPElineupMallItemUpsertBulk
SetSupplier sets the "supplier" field.
func (u *HPElineupMallItemUpsertBulk) SetUpdatedAt(v time.Time) *HPElineupMallItemUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (u *HPElineupMallItemUpsertBulk) Update(set func(*HPElineupMallItemUpsert)) *HPElineupMallItemUpsertBulk
Update allows overriding fields `UPDATE` values. See the HPElineupMallItemCreateBulk.OnConflict documentation for more info.
func (u *HPElineupMallItemUpsertBulk) UpdateCategory() *HPElineupMallItemUpsertBulk
UpdateCategory sets the "category" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertBulk) UpdateCrawledAt() *HPElineupMallItemUpsertBulk
UpdateCrawledAt sets the "crawled_at" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertBulk) UpdateDescription() *HPElineupMallItemUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertBulk) UpdateErrorCount() *HPElineupMallItemUpsertBulk
UpdateErrorCount sets the "error_count" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertBulk) UpdateImages() *HPElineupMallItemUpsertBulk
UpdateImages sets the "images" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertBulk) UpdateIsLimitedToFc() *HPElineupMallItemUpsertBulk
UpdateIsLimitedToFc sets the "is_limited_to_fc" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertBulk) UpdateIsOutOfStock() *HPElineupMallItemUpsertBulk
UpdateIsOutOfStock sets the "is_out_of_stock" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertBulk) UpdateLastErrorMessage() *HPElineupMallItemUpsertBulk
UpdateLastErrorMessage sets the "last_error_message" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertBulk) UpdateManuallyModified() *HPElineupMallItemUpsertBulk
UpdateManuallyModified sets the "manually_modified" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertBulk) UpdateName() *HPElineupMallItemUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertBulk) UpdateNewValues() *HPElineupMallItemUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPElineupMallItem.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPElineupMallItemUpsertBulk) UpdateOrderEndAt() *HPElineupMallItemUpsertBulk
UpdateOrderEndAt sets the "order_end_at" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertBulk) UpdateOrderStartAt() *HPElineupMallItemUpsertBulk
UpdateOrderStartAt sets the "order_start_at" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertBulk) UpdatePermalink() *HPElineupMallItemUpsertBulk
UpdatePermalink sets the "permalink" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertBulk) UpdatePrice() *HPElineupMallItemUpsertBulk
UpdatePrice sets the "price" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertBulk) UpdateRecrawlRequired() *HPElineupMallItemUpsertBulk
UpdateRecrawlRequired sets the "recrawl_required" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertBulk) UpdateSupplier() *HPElineupMallItemUpsertBulk
UpdateSupplier sets the "supplier" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertBulk) UpdateUpdatedAt() *HPElineupMallItemUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPElineupMallItemUpsertOne is the builder for "upsert"-ing
one HPElineupMallItem node.
type HPElineupMallItemUpsertOne struct {
// contains filtered or unexported fields
}
func (u *HPElineupMallItemUpsertOne) AddErrorCount(v int) *HPElineupMallItemUpsertOne
AddErrorCount adds v to the "error_count" field.
func (u *HPElineupMallItemUpsertOne) AddPrice(v int) *HPElineupMallItemUpsertOne
AddPrice adds v to the "price" field.
func (u *HPElineupMallItemUpsertOne) ClearCrawledAt() *HPElineupMallItemUpsertOne
ClearCrawledAt clears the value of the "crawled_at" field.
func (u *HPElineupMallItemUpsertOne) ClearLastErrorMessage() *HPElineupMallItemUpsertOne
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (u *HPElineupMallItemUpsertOne) ClearManuallyModified() *HPElineupMallItemUpsertOne
ClearManuallyModified clears the value of the "manually_modified" field.
func (u *HPElineupMallItemUpsertOne) ClearOrderEndAt() *HPElineupMallItemUpsertOne
ClearOrderEndAt clears the value of the "order_end_at" field.
func (u *HPElineupMallItemUpsertOne) ClearOrderStartAt() *HPElineupMallItemUpsertOne
ClearOrderStartAt clears the value of the "order_start_at" field.
func (u *HPElineupMallItemUpsertOne) ClearRecrawlRequired() *HPElineupMallItemUpsertOne
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (u *HPElineupMallItemUpsertOne) ClearUpdatedAt() *HPElineupMallItemUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPElineupMallItemUpsertOne) DoNothing() *HPElineupMallItemUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPElineupMallItemUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPElineupMallItemUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPElineupMallItemUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *HPElineupMallItemUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *HPElineupMallItemUpsertOne) Ignore() *HPElineupMallItemUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPElineupMallItem.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *HPElineupMallItemUpsertOne) SetCategory(v enums.HPElineupMallItemCategory) *HPElineupMallItemUpsertOne
SetCategory sets the "category" field.
func (u *HPElineupMallItemUpsertOne) SetCrawledAt(v time.Time) *HPElineupMallItemUpsertOne
SetCrawledAt sets the "crawled_at" field.
func (u *HPElineupMallItemUpsertOne) SetDescription(v string) *HPElineupMallItemUpsertOne
SetDescription sets the "description" field.
func (u *HPElineupMallItemUpsertOne) SetErrorCount(v int) *HPElineupMallItemUpsertOne
SetErrorCount sets the "error_count" field.
func (u *HPElineupMallItemUpsertOne) SetImages(v []jsonfields.Media) *HPElineupMallItemUpsertOne
SetImages sets the "images" field.
func (u *HPElineupMallItemUpsertOne) SetIsLimitedToFc(v bool) *HPElineupMallItemUpsertOne
SetIsLimitedToFc sets the "is_limited_to_fc" field.
func (u *HPElineupMallItemUpsertOne) SetIsOutOfStock(v bool) *HPElineupMallItemUpsertOne
SetIsOutOfStock sets the "is_out_of_stock" field.
func (u *HPElineupMallItemUpsertOne) SetLastErrorMessage(v string) *HPElineupMallItemUpsertOne
SetLastErrorMessage sets the "last_error_message" field.
func (u *HPElineupMallItemUpsertOne) SetManuallyModified(v *jsonfields.ManuallyModified) *HPElineupMallItemUpsertOne
SetManuallyModified sets the "manually_modified" field.
func (u *HPElineupMallItemUpsertOne) SetName(v string) *HPElineupMallItemUpsertOne
SetName sets the "name" field.
func (u *HPElineupMallItemUpsertOne) SetOrderEndAt(v time.Time) *HPElineupMallItemUpsertOne
SetOrderEndAt sets the "order_end_at" field.
func (u *HPElineupMallItemUpsertOne) SetOrderStartAt(v time.Time) *HPElineupMallItemUpsertOne
SetOrderStartAt sets the "order_start_at" field.
func (u *HPElineupMallItemUpsertOne) SetPermalink(v string) *HPElineupMallItemUpsertOne
SetPermalink sets the "permalink" field.
func (u *HPElineupMallItemUpsertOne) SetPrice(v int) *HPElineupMallItemUpsertOne
SetPrice sets the "price" field.
func (u *HPElineupMallItemUpsertOne) SetRecrawlRequired(v bool) *HPElineupMallItemUpsertOne
SetRecrawlRequired sets the "recrawl_required" field.
func (u *HPElineupMallItemUpsertOne) SetSupplier(v string) *HPElineupMallItemUpsertOne
SetSupplier sets the "supplier" field.
func (u *HPElineupMallItemUpsertOne) SetUpdatedAt(v time.Time) *HPElineupMallItemUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (u *HPElineupMallItemUpsertOne) Update(set func(*HPElineupMallItemUpsert)) *HPElineupMallItemUpsertOne
Update allows overriding fields `UPDATE` values. See the HPElineupMallItemCreate.OnConflict documentation for more info.
func (u *HPElineupMallItemUpsertOne) UpdateCategory() *HPElineupMallItemUpsertOne
UpdateCategory sets the "category" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertOne) UpdateCrawledAt() *HPElineupMallItemUpsertOne
UpdateCrawledAt sets the "crawled_at" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertOne) UpdateDescription() *HPElineupMallItemUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertOne) UpdateErrorCount() *HPElineupMallItemUpsertOne
UpdateErrorCount sets the "error_count" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertOne) UpdateImages() *HPElineupMallItemUpsertOne
UpdateImages sets the "images" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertOne) UpdateIsLimitedToFc() *HPElineupMallItemUpsertOne
UpdateIsLimitedToFc sets the "is_limited_to_fc" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertOne) UpdateIsOutOfStock() *HPElineupMallItemUpsertOne
UpdateIsOutOfStock sets the "is_out_of_stock" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertOne) UpdateLastErrorMessage() *HPElineupMallItemUpsertOne
UpdateLastErrorMessage sets the "last_error_message" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertOne) UpdateManuallyModified() *HPElineupMallItemUpsertOne
UpdateManuallyModified sets the "manually_modified" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertOne) UpdateName() *HPElineupMallItemUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertOne) UpdateNewValues() *HPElineupMallItemUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPElineupMallItem.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPElineupMallItemUpsertOne) UpdateOrderEndAt() *HPElineupMallItemUpsertOne
UpdateOrderEndAt sets the "order_end_at" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertOne) UpdateOrderStartAt() *HPElineupMallItemUpsertOne
UpdateOrderStartAt sets the "order_start_at" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertOne) UpdatePermalink() *HPElineupMallItemUpsertOne
UpdatePermalink sets the "permalink" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertOne) UpdatePrice() *HPElineupMallItemUpsertOne
UpdatePrice sets the "price" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertOne) UpdateRecrawlRequired() *HPElineupMallItemUpsertOne
UpdateRecrawlRequired sets the "recrawl_required" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertOne) UpdateSupplier() *HPElineupMallItemUpsertOne
UpdateSupplier sets the "supplier" field to the value that was provided on create.
func (u *HPElineupMallItemUpsertOne) UpdateUpdatedAt() *HPElineupMallItemUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPElineupMallItems is a parsable slice of HPElineupMallItem.
type HPElineupMallItems []*HPElineupMallItem
HPEvent is the model entity for the HPEvent schema.
type HPEvent struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Key holds the value of the "key" field.
Key string `json:"key,omitempty"`
// DisplayTitles holds the value of the "display_titles" field.
DisplayTitles []string `json:"display_titles,omitempty"`
// OpenAt holds the value of the "open_at" field.
OpenAt time.Time `json:"open_at,omitempty"`
// StartAt holds the value of the "start_at" field.
StartAt time.Time `json:"start_at,omitempty"`
// Venue holds the value of the "venue" field.
Venue string `json:"venue,omitempty"`
// Prefecture holds the value of the "prefecture" field.
Prefecture string `json:"prefecture,omitempty"`
// Source holds the value of the "source" field.
Source enums.HPEventSource `json:"source,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the HPEventQuery when eager-loading is set.
Edges HPEventEdges `json:"edges"`
// contains filtered or unexported fields
}
func (n *HPEvent) IsNode()
IsNode implements the Node interface check for GQLGen.
func (he *HPEvent) NamedArtists(name string) ([]*HPArtist, error)
NamedArtists returns the Artists named value or an error if the edge was not loaded in eager-loading with this name.
func (he *HPEvent) NamedHpfcEventTickets(name string) ([]*HPFCEventTicket, error)
NamedHpfcEventTickets returns the HpfcEventTickets named value or an error if the edge was not loaded in eager-loading with this name.
func (he *HPEvent) NamedMembers(name string) ([]*HPMember, error)
NamedMembers returns the Members named value or an error if the edge was not loaded in eager-loading with this name.
func (he *HPEvent) QueryArtists() *HPArtistQuery
QueryArtists queries the "artists" edge of the HPEvent entity.
func (he *HPEvent) QueryHpfcEventTickets() *HPFCEventTicketQuery
QueryHpfcEventTickets queries the "hpfc_event_tickets" edge of the HPEvent entity.
func (he *HPEvent) QueryMembers() *HPMemberQuery
QueryMembers queries the "members" edge of the HPEvent entity.
func (he *HPEvent) String() string
String implements the fmt.Stringer.
func (he *HPEvent) ToEdge(order *HPEventOrder) *HPEventEdge
ToEdge converts HPEvent into HPEventEdge.
func (he *HPEvent) Unwrap() *HPEvent
Unwrap unwraps the HPEvent entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (he *HPEvent) Update() *HPEventUpdateOne
Update returns a builder for updating this HPEvent. Note that you need to call HPEvent.Unwrap() before calling this method if this HPEvent was returned from a transaction, and the transaction was committed or rolled back.
func (he *HPEvent) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the HPEvent. This includes values selected through modifiers, order, etc.
HPEventClient is a client for the HPEvent schema.
type HPEventClient struct {
// contains filtered or unexported fields
}
func NewHPEventClient(c config) *HPEventClient
NewHPEventClient returns a client for the HPEvent from the given config.
func (c *HPEventClient) Create() *HPEventCreate
Create returns a builder for creating a HPEvent entity.
func (c *HPEventClient) CreateBulk(builders ...*HPEventCreate) *HPEventCreateBulk
CreateBulk returns a builder for creating a bulk of HPEvent entities.
func (c *HPEventClient) Delete() *HPEventDelete
Delete returns a delete builder for HPEvent.
func (c *HPEventClient) DeleteOne(he *HPEvent) *HPEventDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *HPEventClient) DeleteOneID(id int) *HPEventDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *HPEventClient) Get(ctx context.Context, id int) (*HPEvent, error)
Get returns a HPEvent entity by its id.
func (c *HPEventClient) GetX(ctx context.Context, id int) *HPEvent
GetX is like Get, but panics if an error occurs.
func (c *HPEventClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *HPEventClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hpevent.Intercept(f(g(h())))`.
func (c *HPEventClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *HPEventClient) Query() *HPEventQuery
Query returns a query builder for HPEvent.
func (c *HPEventClient) QueryArtists(he *HPEvent) *HPArtistQuery
QueryArtists queries the artists edge of a HPEvent.
func (c *HPEventClient) QueryHpfcEventTickets(he *HPEvent) *HPFCEventTicketQuery
QueryHpfcEventTickets queries the hpfc_event_tickets edge of a HPEvent.
func (c *HPEventClient) QueryMembers(he *HPEvent) *HPMemberQuery
QueryMembers queries the members edge of a HPEvent.
func (c *HPEventClient) Update() *HPEventUpdate
Update returns an update builder for HPEvent.
func (c *HPEventClient) UpdateOne(he *HPEvent) *HPEventUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *HPEventClient) UpdateOneID(id int) *HPEventUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *HPEventClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hpevent.Hooks(f(g(h())))`.
HPEventConnection is the connection containing edges to HPEvent.
type HPEventConnection struct {
Edges []*HPEventEdge `json:"edges"`
PageInfo PageInfo `json:"pageInfo"`
TotalCount int `json:"totalCount"`
}
HPEventCreate is the builder for creating a HPEvent entity.
type HPEventCreate struct {
// contains filtered or unexported fields
}
func (hec *HPEventCreate) AddArtistIDs(ids ...int) *HPEventCreate
AddArtistIDs adds the "artists" edge to the HPArtist entity by IDs.
func (hec *HPEventCreate) AddArtists(h ...*HPArtist) *HPEventCreate
AddArtists adds the "artists" edges to the HPArtist entity.
func (hec *HPEventCreate) AddHpfcEventTicketIDs(ids ...int) *HPEventCreate
AddHpfcEventTicketIDs adds the "hpfc_event_tickets" edge to the HPFCEventTicket entity by IDs.
func (hec *HPEventCreate) AddHpfcEventTickets(h ...*HPFCEventTicket) *HPEventCreate
AddHpfcEventTickets adds the "hpfc_event_tickets" edges to the HPFCEventTicket entity.
func (hec *HPEventCreate) AddMemberIDs(ids ...int) *HPEventCreate
AddMemberIDs adds the "members" edge to the HPMember entity by IDs.
func (hec *HPEventCreate) AddMembers(h ...*HPMember) *HPEventCreate
AddMembers adds the "members" edges to the HPMember entity.
func (hec *HPEventCreate) Exec(ctx context.Context) error
Exec executes the query.
func (hec *HPEventCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hec *HPEventCreate) Mutation() *HPEventMutation
Mutation returns the HPEventMutation object of the builder.
func (hec *HPEventCreate) OnConflict(opts ...sql.ConflictOption) *HPEventUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPEvent.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPEventUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (hec *HPEventCreate) OnConflictColumns(columns ...string) *HPEventUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPEvent.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hec *HPEventCreate) Save(ctx context.Context) (*HPEvent, error)
Save creates the HPEvent in the database.
func (hec *HPEventCreate) SaveX(ctx context.Context) *HPEvent
SaveX calls Save and panics if Save returns an error.
func (hec *HPEventCreate) SetCreatedAt(t time.Time) *HPEventCreate
SetCreatedAt sets the "created_at" field.
func (hec *HPEventCreate) SetDisplayTitles(s []string) *HPEventCreate
SetDisplayTitles sets the "display_titles" field.
func (hec *HPEventCreate) SetKey(s string) *HPEventCreate
SetKey sets the "key" field.
func (hec *HPEventCreate) SetNillableCreatedAt(t *time.Time) *HPEventCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (hec *HPEventCreate) SetNillableOpenAt(t *time.Time) *HPEventCreate
SetNillableOpenAt sets the "open_at" field if the given value is not nil.
func (hec *HPEventCreate) SetNillableSource(ees *enums.HPEventSource) *HPEventCreate
SetNillableSource sets the "source" field if the given value is not nil.
func (hec *HPEventCreate) SetNillableUpdatedAt(t *time.Time) *HPEventCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hec *HPEventCreate) SetOpenAt(t time.Time) *HPEventCreate
SetOpenAt sets the "open_at" field.
func (hec *HPEventCreate) SetPrefecture(s string) *HPEventCreate
SetPrefecture sets the "prefecture" field.
func (hec *HPEventCreate) SetSource(ees enums.HPEventSource) *HPEventCreate
SetSource sets the "source" field.
func (hec *HPEventCreate) SetStartAt(t time.Time) *HPEventCreate
SetStartAt sets the "start_at" field.
func (hec *HPEventCreate) SetUpdatedAt(t time.Time) *HPEventCreate
SetUpdatedAt sets the "updated_at" field.
func (hec *HPEventCreate) SetVenue(s string) *HPEventCreate
SetVenue sets the "venue" field.
HPEventCreateBulk is the builder for creating many HPEvent entities in bulk.
type HPEventCreateBulk struct {
// contains filtered or unexported fields
}
func (hecb *HPEventCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (hecb *HPEventCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hecb *HPEventCreateBulk) OnConflict(opts ...sql.ConflictOption) *HPEventUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPEvent.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPEventUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (hecb *HPEventCreateBulk) OnConflictColumns(columns ...string) *HPEventUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPEvent.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hecb *HPEventCreateBulk) Save(ctx context.Context) ([]*HPEvent, error)
Save creates the HPEvent entities in the database.
func (hecb *HPEventCreateBulk) SaveX(ctx context.Context) []*HPEvent
SaveX is like Save, but panics if an error occurs.
HPEventDelete is the builder for deleting a HPEvent entity.
type HPEventDelete struct {
// contains filtered or unexported fields
}
func (hed *HPEventDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (hed *HPEventDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (hed *HPEventDelete) Where(ps ...predicate.HPEvent) *HPEventDelete
Where appends a list predicates to the HPEventDelete builder.
HPEventDeleteOne is the builder for deleting a single HPEvent entity.
type HPEventDeleteOne struct {
// contains filtered or unexported fields
}
func (hedo *HPEventDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (hedo *HPEventDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hedo *HPEventDeleteOne) Where(ps ...predicate.HPEvent) *HPEventDeleteOne
Where appends a list predicates to the HPEventDelete builder.
HPEventEdge is the edge representation of HPEvent.
type HPEventEdge struct {
Node *HPEvent `json:"node"`
Cursor Cursor `json:"cursor"`
}
HPEventEdges holds the relations/edges for other nodes in the graph.
type HPEventEdges struct {
// Members holds the value of the members edge.
Members []*HPMember `json:"members,omitempty"`
// Artists holds the value of the artists edge.
Artists []*HPArtist `json:"artists,omitempty"`
// HpfcEventTickets holds the value of the hpfc_event_tickets edge.
HpfcEventTickets []*HPFCEventTicket `json:"hpfc_event_tickets,omitempty"`
// contains filtered or unexported fields
}
func (e HPEventEdges) ArtistsOrErr() ([]*HPArtist, error)
ArtistsOrErr returns the Artists value or an error if the edge was not loaded in eager-loading.
func (e HPEventEdges) HpfcEventTicketsOrErr() ([]*HPFCEventTicket, error)
HpfcEventTicketsOrErr returns the HpfcEventTickets value or an error if the edge was not loaded in eager-loading.
func (e HPEventEdges) MembersOrErr() ([]*HPMember, error)
MembersOrErr returns the Members value or an error if the edge was not loaded in eager-loading.
HPEventFilter provides a generic filtering capability at runtime for HPEventQuery.
type HPEventFilter struct {
// contains filtered or unexported fields
}
func (f *HPEventFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *HPEventFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (f *HPEventFilter) WhereDisplayTitles(p entql.BytesP)
WhereDisplayTitles applies the entql json.RawMessage predicate on the display_titles field.
func (f *HPEventFilter) WhereHasArtists()
WhereHasArtists applies a predicate to check if query has an edge artists.
func (f *HPEventFilter) WhereHasArtistsWith(preds ...predicate.HPArtist)
WhereHasArtistsWith applies a predicate to check if query has an edge artists with a given conditions (other predicates).
func (f *HPEventFilter) WhereHasHpfcEventTickets()
WhereHasHpfcEventTickets applies a predicate to check if query has an edge hpfc_event_tickets.
func (f *HPEventFilter) WhereHasHpfcEventTicketsWith(preds ...predicate.HPFCEventTicket)
WhereHasHpfcEventTicketsWith applies a predicate to check if query has an edge hpfc_event_tickets with a given conditions (other predicates).
func (f *HPEventFilter) WhereHasMembers()
WhereHasMembers applies a predicate to check if query has an edge members.
func (f *HPEventFilter) WhereHasMembersWith(preds ...predicate.HPMember)
WhereHasMembersWith applies a predicate to check if query has an edge members with a given conditions (other predicates).
func (f *HPEventFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *HPEventFilter) WhereKey(p entql.StringP)
WhereKey applies the entql string predicate on the key field.
func (f *HPEventFilter) WhereOpenAt(p entql.TimeP)
WhereOpenAt applies the entql time.Time predicate on the open_at field.
func (f *HPEventFilter) WherePrefecture(p entql.StringP)
WherePrefecture applies the entql string predicate on the prefecture field.
func (f *HPEventFilter) WhereSource(p entql.StringP)
WhereSource applies the entql string predicate on the source field.
func (f *HPEventFilter) WhereStartAt(p entql.TimeP)
WhereStartAt applies the entql time.Time predicate on the start_at field.
func (f *HPEventFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
func (f *HPEventFilter) WhereVenue(p entql.StringP)
WhereVenue applies the entql string predicate on the venue field.
HPEventGroupBy is the group-by builder for HPEvent entities.
type HPEventGroupBy struct {
// contains filtered or unexported fields
}
func (hegb *HPEventGroupBy) Aggregate(fns ...AggregateFunc) *HPEventGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *HPEventGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPEventGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPEventGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPEventGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPEventGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPEventGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPEventGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPEventGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPEventGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPEventGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPEventGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPEventGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hegb *HPEventGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPEventGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPEventGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPEventGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPEventGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPEventGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPEventMutation represents an operation that mutates the HPEvent nodes in the graph.
type HPEventMutation struct {
// contains filtered or unexported fields
}
func (m *HPEventMutation) AddArtistIDs(ids ...int)
AddArtistIDs adds the "artists" edge to the HPArtist entity by ids.
func (m *HPEventMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPEventMutation) AddHpfcEventTicketIDs(ids ...int)
AddHpfcEventTicketIDs adds the "hpfc_event_tickets" edge to the HPFCEventTicket entity by ids.
func (m *HPEventMutation) AddMemberIDs(ids ...int)
AddMemberIDs adds the "members" edge to the HPMember entity by ids.
func (m *HPEventMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *HPEventMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPEventMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *HPEventMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *HPEventMutation) AppendDisplayTitles(s []string)
AppendDisplayTitles adds s to the "display_titles" field.
func (m *HPEventMutation) AppendedDisplayTitles() ([]string, bool)
AppendedDisplayTitles returns the list of values that were appended to the "display_titles" field in this mutation.
func (m *HPEventMutation) ArtistsCleared() bool
ArtistsCleared reports if the "artists" edge to the HPArtist entity was cleared.
func (m *HPEventMutation) ArtistsIDs() (ids []int)
ArtistsIDs returns the "artists" edge IDs in the mutation.
func (m *HPEventMutation) ClearArtists()
ClearArtists clears the "artists" edge to the HPArtist entity.
func (m *HPEventMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (m *HPEventMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *HPEventMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPEventMutation) ClearHpfcEventTickets()
ClearHpfcEventTickets clears the "hpfc_event_tickets" edge to the HPFCEventTicket entity.
func (m *HPEventMutation) ClearMembers()
ClearMembers clears the "members" edge to the HPMember entity.
func (m *HPEventMutation) ClearOpenAt()
ClearOpenAt clears the value of the "open_at" field.
func (m *HPEventMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (m *HPEventMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *HPEventMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m HPEventMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *HPEventMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (m *HPEventMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (m *HPEventMutation) DisplayTitles() (r []string, exists bool)
DisplayTitles returns the value of the "display_titles" field in the mutation.
func (m *HPEventMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *HPEventMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPEventMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *HPEventMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *HPEventMutation) Filter() *HPEventFilter
Filter returns an entql.Where implementation to apply filters on the HPEventMutation builder.
func (m *HPEventMutation) HpfcEventTicketsCleared() bool
HpfcEventTicketsCleared reports if the "hpfc_event_tickets" edge to the HPFCEventTicket entity was cleared.
func (m *HPEventMutation) HpfcEventTicketsIDs() (ids []int)
HpfcEventTicketsIDs returns the "hpfc_event_tickets" edge IDs in the mutation.
func (m *HPEventMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *HPEventMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *HPEventMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (m *HPEventMutation) MembersCleared() bool
MembersCleared reports if the "members" edge to the HPMember entity was cleared.
func (m *HPEventMutation) MembersIDs() (ids []int)
MembersIDs returns the "members" edge IDs in the mutation.
func (m *HPEventMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
OldCreatedAt returns the old "created_at" field's value of the HPEvent entity. If the HPEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPEventMutation) OldDisplayTitles(ctx context.Context) (v []string, err error)
OldDisplayTitles returns the old "display_titles" field's value of the HPEvent entity. If the HPEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPEventMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *HPEventMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the HPEvent entity. If the HPEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPEventMutation) OldOpenAt(ctx context.Context) (v time.Time, err error)
OldOpenAt returns the old "open_at" field's value of the HPEvent entity. If the HPEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPEventMutation) OldPrefecture(ctx context.Context) (v string, err error)
OldPrefecture returns the old "prefecture" field's value of the HPEvent entity. If the HPEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPEventMutation) OldSource(ctx context.Context) (v enums.HPEventSource, err error)
OldSource returns the old "source" field's value of the HPEvent entity. If the HPEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPEventMutation) OldStartAt(ctx context.Context) (v time.Time, err error)
OldStartAt returns the old "start_at" field's value of the HPEvent entity. If the HPEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPEventMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
OldUpdatedAt returns the old "updated_at" field's value of the HPEvent entity. If the HPEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPEventMutation) OldVenue(ctx context.Context) (v string, err error)
OldVenue returns the old "venue" field's value of the HPEvent entity. If the HPEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPEventMutation) Op() Op
Op returns the operation name.
func (m *HPEventMutation) OpenAt() (r time.Time, exists bool)
OpenAt returns the value of the "open_at" field in the mutation.
func (m *HPEventMutation) OpenAtCleared() bool
OpenAtCleared returns if the "open_at" field was cleared in this mutation.
func (m *HPEventMutation) Prefecture() (r string, exists bool)
Prefecture returns the value of the "prefecture" field in the mutation.
func (m *HPEventMutation) RemoveArtistIDs(ids ...int)
RemoveArtistIDs removes the "artists" edge to the HPArtist entity by IDs.
func (m *HPEventMutation) RemoveHpfcEventTicketIDs(ids ...int)
RemoveHpfcEventTicketIDs removes the "hpfc_event_tickets" edge to the HPFCEventTicket entity by IDs.
func (m *HPEventMutation) RemoveMemberIDs(ids ...int)
RemoveMemberIDs removes the "members" edge to the HPMember entity by IDs.
func (m *HPEventMutation) RemovedArtistsIDs() (ids []int)
RemovedArtists returns the removed IDs of the "artists" edge to the HPArtist entity.
func (m *HPEventMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *HPEventMutation) RemovedHpfcEventTicketsIDs() (ids []int)
RemovedHpfcEventTickets returns the removed IDs of the "hpfc_event_tickets" edge to the HPFCEventTicket entity.
func (m *HPEventMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *HPEventMutation) RemovedMembersIDs() (ids []int)
RemovedMembers returns the removed IDs of the "members" edge to the HPMember entity.
func (m *HPEventMutation) ResetArtists()
ResetArtists resets all changes to the "artists" edge.
func (m *HPEventMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (m *HPEventMutation) ResetDisplayTitles()
ResetDisplayTitles resets all changes to the "display_titles" field.
func (m *HPEventMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *HPEventMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPEventMutation) ResetHpfcEventTickets()
ResetHpfcEventTickets resets all changes to the "hpfc_event_tickets" edge.
func (m *HPEventMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (m *HPEventMutation) ResetMembers()
ResetMembers resets all changes to the "members" edge.
func (m *HPEventMutation) ResetOpenAt()
ResetOpenAt resets all changes to the "open_at" field.
func (m *HPEventMutation) ResetPrefecture()
ResetPrefecture resets all changes to the "prefecture" field.
func (m *HPEventMutation) ResetSource()
ResetSource resets all changes to the "source" field.
func (m *HPEventMutation) ResetStartAt()
ResetStartAt resets all changes to the "start_at" field.
func (m *HPEventMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (m *HPEventMutation) ResetVenue()
ResetVenue resets all changes to the "venue" field.
func (m *HPEventMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (m *HPEventMutation) SetDisplayTitles(s []string)
SetDisplayTitles sets the "display_titles" field.
func (m *HPEventMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPEventMutation) SetKey(s string)
SetKey sets the "key" field.
func (m *HPEventMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *HPEventMutation) SetOpenAt(t time.Time)
SetOpenAt sets the "open_at" field.
func (m *HPEventMutation) SetPrefecture(s string)
SetPrefecture sets the "prefecture" field.
func (m *HPEventMutation) SetSource(ees enums.HPEventSource)
SetSource sets the "source" field.
func (m *HPEventMutation) SetStartAt(t time.Time)
SetStartAt sets the "start_at" field.
func (m *HPEventMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (m *HPEventMutation) SetVenue(s string)
SetVenue sets the "venue" field.
func (m *HPEventMutation) Source() (r enums.HPEventSource, exists bool)
Source returns the value of the "source" field in the mutation.
func (m *HPEventMutation) StartAt() (r time.Time, exists bool)
StartAt returns the value of the "start_at" field in the mutation.
func (m HPEventMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *HPEventMutation) Type() string
Type returns the node type of this mutation (HPEvent).
func (m *HPEventMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (m *HPEventMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (m *HPEventMutation) Venue() (r string, exists bool)
Venue returns the value of the "venue" field in the mutation.
func (m *HPEventMutation) Where(ps ...predicate.HPEvent)
Where appends a list predicates to the HPEventMutation builder.
func (m *HPEventMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HPEventMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
HPEventOrder defines the ordering of HPEvent.
type HPEventOrder struct {
Direction OrderDirection `json:"direction"`
Field *HPEventOrderField `json:"field"`
}
HPEventOrderField defines the ordering field of HPEvent.
type HPEventOrderField struct {
// contains filtered or unexported fields
}
HPEventPaginateOption enables pagination customization.
type HPEventPaginateOption func(*hpeventPager) error
func WithHPEventFilter(filter func(*HPEventQuery) (*HPEventQuery, error)) HPEventPaginateOption
WithHPEventFilter configures pagination filter.
func WithHPEventOrder(order *HPEventOrder) HPEventPaginateOption
WithHPEventOrder configures pagination ordering.
HPEventQuery is the builder for querying HPEvent entities.
type HPEventQuery struct {
// contains filtered or unexported fields
}
func (heq *HPEventQuery) Aggregate(fns ...AggregateFunc) *HPEventSelect
Aggregate returns a HPEventSelect configured with the given aggregations.
func (heq *HPEventQuery) All(ctx context.Context) ([]*HPEvent, error)
All executes the query and returns a list of HPEvents.
func (heq *HPEventQuery) AllX(ctx context.Context) []*HPEvent
AllX is like All, but panics if an error occurs.
func (heq *HPEventQuery) Clone() *HPEventQuery
Clone returns a duplicate of the HPEventQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (he *HPEventQuery) CollectFields(ctx context.Context, satisfies ...string) (*HPEventQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (heq *HPEventQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (heq *HPEventQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (heq *HPEventQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (heq *HPEventQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (heq *HPEventQuery) Filter() *HPEventFilter
Filter returns a Filter implementation to apply filters on the HPEventQuery builder.
func (heq *HPEventQuery) First(ctx context.Context) (*HPEvent, error)
First returns the first HPEvent entity from the query. Returns a *NotFoundError when no HPEvent was found.
func (heq *HPEventQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first HPEvent ID from the query. Returns a *NotFoundError when no HPEvent ID was found.
func (heq *HPEventQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (heq *HPEventQuery) FirstX(ctx context.Context) *HPEvent
FirstX is like First, but panics if an error occurs.
func (heq *HPEventQuery) GroupBy(field string, fields ...string) *HPEventGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.HPEvent.Query().
GroupBy(hpevent.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (heq *HPEventQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of HPEvent IDs.
func (heq *HPEventQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (heq *HPEventQuery) Limit(limit int) *HPEventQuery
Limit the number of records to be returned by this query.
func (heq *HPEventQuery) Offset(offset int) *HPEventQuery
Offset to start from.
func (heq *HPEventQuery) Only(ctx context.Context) (*HPEvent, error)
Only returns a single HPEvent entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HPEvent entity is found. Returns a *NotFoundError when no HPEvent entities are found.
func (heq *HPEventQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only HPEvent ID in the query. Returns a *NotSingularError when more than one HPEvent ID is found. Returns a *NotFoundError when no entities are found.
func (heq *HPEventQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (heq *HPEventQuery) OnlyX(ctx context.Context) *HPEvent
OnlyX is like Only, but panics if an error occurs.
func (heq *HPEventQuery) Order(o ...hpevent.Order) *HPEventQuery
Order specifies how the records should be ordered.
func (he *HPEventQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...HPEventPaginateOption, ) (*HPEventConnection, error)
Paginate executes the query and returns a relay based cursor connection to HPEvent.
func (heq *HPEventQuery) QueryArtists() *HPArtistQuery
QueryArtists chains the current query on the "artists" edge.
func (heq *HPEventQuery) QueryHpfcEventTickets() *HPFCEventTicketQuery
QueryHpfcEventTickets chains the current query on the "hpfc_event_tickets" edge.
func (heq *HPEventQuery) QueryMembers() *HPMemberQuery
QueryMembers chains the current query on the "members" edge.
func (heq *HPEventQuery) Select(fields ...string) *HPEventSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.HPEvent.Query().
Select(hpevent.FieldCreatedAt).
Scan(ctx, &v)
func (heq *HPEventQuery) Unique(unique bool) *HPEventQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (heq *HPEventQuery) Where(ps ...predicate.HPEvent) *HPEventQuery
Where adds a new predicate for the HPEventQuery builder.
func (heq *HPEventQuery) WithArtists(opts ...func(*HPArtistQuery)) *HPEventQuery
WithArtists tells the query-builder to eager-load the nodes that are connected to the "artists" edge. The optional arguments are used to configure the query builder of the edge.
func (heq *HPEventQuery) WithHpfcEventTickets(opts ...func(*HPFCEventTicketQuery)) *HPEventQuery
WithHpfcEventTickets tells the query-builder to eager-load the nodes that are connected to the "hpfc_event_tickets" edge. The optional arguments are used to configure the query builder of the edge.
func (heq *HPEventQuery) WithMembers(opts ...func(*HPMemberQuery)) *HPEventQuery
WithMembers tells the query-builder to eager-load the nodes that are connected to the "members" edge. The optional arguments are used to configure the query builder of the edge.
func (heq *HPEventQuery) WithNamedArtists(name string, opts ...func(*HPArtistQuery)) *HPEventQuery
WithNamedArtists tells the query-builder to eager-load the nodes that are connected to the "artists" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (heq *HPEventQuery) WithNamedHpfcEventTickets(name string, opts ...func(*HPFCEventTicketQuery)) *HPEventQuery
WithNamedHpfcEventTickets tells the query-builder to eager-load the nodes that are connected to the "hpfc_event_tickets" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (heq *HPEventQuery) WithNamedMembers(name string, opts ...func(*HPMemberQuery)) *HPEventQuery
WithNamedMembers tells the query-builder to eager-load the nodes that are connected to the "members" edge with the given name. The optional arguments are used to configure the query builder of the edge.
HPEventSelect is the builder for selecting fields of HPEvent entities.
type HPEventSelect struct {
*HPEventQuery
// contains filtered or unexported fields
}
func (hes *HPEventSelect) Aggregate(fns ...AggregateFunc) *HPEventSelect
Aggregate adds the given aggregation functions to the selector query.
func (s *HPEventSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPEventSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPEventSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPEventSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPEventSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPEventSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPEventSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPEventSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPEventSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPEventSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPEventSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPEventSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hes *HPEventSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPEventSelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPEventSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPEventSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPEventSelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPEventSelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPEventUpdate is the builder for updating HPEvent entities.
type HPEventUpdate struct {
// contains filtered or unexported fields
}
func (heu *HPEventUpdate) AddArtistIDs(ids ...int) *HPEventUpdate
AddArtistIDs adds the "artists" edge to the HPArtist entity by IDs.
func (heu *HPEventUpdate) AddArtists(h ...*HPArtist) *HPEventUpdate
AddArtists adds the "artists" edges to the HPArtist entity.
func (heu *HPEventUpdate) AddHpfcEventTicketIDs(ids ...int) *HPEventUpdate
AddHpfcEventTicketIDs adds the "hpfc_event_tickets" edge to the HPFCEventTicket entity by IDs.
func (heu *HPEventUpdate) AddHpfcEventTickets(h ...*HPFCEventTicket) *HPEventUpdate
AddHpfcEventTickets adds the "hpfc_event_tickets" edges to the HPFCEventTicket entity.
func (heu *HPEventUpdate) AddMemberIDs(ids ...int) *HPEventUpdate
AddMemberIDs adds the "members" edge to the HPMember entity by IDs.
func (heu *HPEventUpdate) AddMembers(h ...*HPMember) *HPEventUpdate
AddMembers adds the "members" edges to the HPMember entity.
func (heu *HPEventUpdate) AppendDisplayTitles(s []string) *HPEventUpdate
AppendDisplayTitles appends s to the "display_titles" field.
func (heu *HPEventUpdate) ClearArtists() *HPEventUpdate
ClearArtists clears all "artists" edges to the HPArtist entity.
func (heu *HPEventUpdate) ClearHpfcEventTickets() *HPEventUpdate
ClearHpfcEventTickets clears all "hpfc_event_tickets" edges to the HPFCEventTicket entity.
func (heu *HPEventUpdate) ClearMembers() *HPEventUpdate
ClearMembers clears all "members" edges to the HPMember entity.
func (heu *HPEventUpdate) ClearOpenAt() *HPEventUpdate
ClearOpenAt clears the value of the "open_at" field.
func (heu *HPEventUpdate) ClearUpdatedAt() *HPEventUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (heu *HPEventUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (heu *HPEventUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (heu *HPEventUpdate) Mutation() *HPEventMutation
Mutation returns the HPEventMutation object of the builder.
func (heu *HPEventUpdate) RemoveArtistIDs(ids ...int) *HPEventUpdate
RemoveArtistIDs removes the "artists" edge to HPArtist entities by IDs.
func (heu *HPEventUpdate) RemoveArtists(h ...*HPArtist) *HPEventUpdate
RemoveArtists removes "artists" edges to HPArtist entities.
func (heu *HPEventUpdate) RemoveHpfcEventTicketIDs(ids ...int) *HPEventUpdate
RemoveHpfcEventTicketIDs removes the "hpfc_event_tickets" edge to HPFCEventTicket entities by IDs.
func (heu *HPEventUpdate) RemoveHpfcEventTickets(h ...*HPFCEventTicket) *HPEventUpdate
RemoveHpfcEventTickets removes "hpfc_event_tickets" edges to HPFCEventTicket entities.
func (heu *HPEventUpdate) RemoveMemberIDs(ids ...int) *HPEventUpdate
RemoveMemberIDs removes the "members" edge to HPMember entities by IDs.
func (heu *HPEventUpdate) RemoveMembers(h ...*HPMember) *HPEventUpdate
RemoveMembers removes "members" edges to HPMember entities.
func (heu *HPEventUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (heu *HPEventUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (heu *HPEventUpdate) SetDisplayTitles(s []string) *HPEventUpdate
SetDisplayTitles sets the "display_titles" field.
func (heu *HPEventUpdate) SetKey(s string) *HPEventUpdate
SetKey sets the "key" field.
func (heu *HPEventUpdate) SetNillableOpenAt(t *time.Time) *HPEventUpdate
SetNillableOpenAt sets the "open_at" field if the given value is not nil.
func (heu *HPEventUpdate) SetNillableSource(ees *enums.HPEventSource) *HPEventUpdate
SetNillableSource sets the "source" field if the given value is not nil.
func (heu *HPEventUpdate) SetNillableUpdatedAt(t *time.Time) *HPEventUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (heu *HPEventUpdate) SetOpenAt(t time.Time) *HPEventUpdate
SetOpenAt sets the "open_at" field.
func (heu *HPEventUpdate) SetPrefecture(s string) *HPEventUpdate
SetPrefecture sets the "prefecture" field.
func (heu *HPEventUpdate) SetSource(ees enums.HPEventSource) *HPEventUpdate
SetSource sets the "source" field.
func (heu *HPEventUpdate) SetStartAt(t time.Time) *HPEventUpdate
SetStartAt sets the "start_at" field.
func (heu *HPEventUpdate) SetUpdatedAt(t time.Time) *HPEventUpdate
SetUpdatedAt sets the "updated_at" field.
func (heu *HPEventUpdate) SetVenue(s string) *HPEventUpdate
SetVenue sets the "venue" field.
func (heu *HPEventUpdate) Where(ps ...predicate.HPEvent) *HPEventUpdate
Where appends a list predicates to the HPEventUpdate builder.
HPEventUpdateOne is the builder for updating a single HPEvent entity.
type HPEventUpdateOne struct {
// contains filtered or unexported fields
}
func (heuo *HPEventUpdateOne) AddArtistIDs(ids ...int) *HPEventUpdateOne
AddArtistIDs adds the "artists" edge to the HPArtist entity by IDs.
func (heuo *HPEventUpdateOne) AddArtists(h ...*HPArtist) *HPEventUpdateOne
AddArtists adds the "artists" edges to the HPArtist entity.
func (heuo *HPEventUpdateOne) AddHpfcEventTicketIDs(ids ...int) *HPEventUpdateOne
AddHpfcEventTicketIDs adds the "hpfc_event_tickets" edge to the HPFCEventTicket entity by IDs.
func (heuo *HPEventUpdateOne) AddHpfcEventTickets(h ...*HPFCEventTicket) *HPEventUpdateOne
AddHpfcEventTickets adds the "hpfc_event_tickets" edges to the HPFCEventTicket entity.
func (heuo *HPEventUpdateOne) AddMemberIDs(ids ...int) *HPEventUpdateOne
AddMemberIDs adds the "members" edge to the HPMember entity by IDs.
func (heuo *HPEventUpdateOne) AddMembers(h ...*HPMember) *HPEventUpdateOne
AddMembers adds the "members" edges to the HPMember entity.
func (heuo *HPEventUpdateOne) AppendDisplayTitles(s []string) *HPEventUpdateOne
AppendDisplayTitles appends s to the "display_titles" field.
func (heuo *HPEventUpdateOne) ClearArtists() *HPEventUpdateOne
ClearArtists clears all "artists" edges to the HPArtist entity.
func (heuo *HPEventUpdateOne) ClearHpfcEventTickets() *HPEventUpdateOne
ClearHpfcEventTickets clears all "hpfc_event_tickets" edges to the HPFCEventTicket entity.
func (heuo *HPEventUpdateOne) ClearMembers() *HPEventUpdateOne
ClearMembers clears all "members" edges to the HPMember entity.
func (heuo *HPEventUpdateOne) ClearOpenAt() *HPEventUpdateOne
ClearOpenAt clears the value of the "open_at" field.
func (heuo *HPEventUpdateOne) ClearUpdatedAt() *HPEventUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (heuo *HPEventUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (heuo *HPEventUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (heuo *HPEventUpdateOne) Mutation() *HPEventMutation
Mutation returns the HPEventMutation object of the builder.
func (heuo *HPEventUpdateOne) RemoveArtistIDs(ids ...int) *HPEventUpdateOne
RemoveArtistIDs removes the "artists" edge to HPArtist entities by IDs.
func (heuo *HPEventUpdateOne) RemoveArtists(h ...*HPArtist) *HPEventUpdateOne
RemoveArtists removes "artists" edges to HPArtist entities.
func (heuo *HPEventUpdateOne) RemoveHpfcEventTicketIDs(ids ...int) *HPEventUpdateOne
RemoveHpfcEventTicketIDs removes the "hpfc_event_tickets" edge to HPFCEventTicket entities by IDs.
func (heuo *HPEventUpdateOne) RemoveHpfcEventTickets(h ...*HPFCEventTicket) *HPEventUpdateOne
RemoveHpfcEventTickets removes "hpfc_event_tickets" edges to HPFCEventTicket entities.
func (heuo *HPEventUpdateOne) RemoveMemberIDs(ids ...int) *HPEventUpdateOne
RemoveMemberIDs removes the "members" edge to HPMember entities by IDs.
func (heuo *HPEventUpdateOne) RemoveMembers(h ...*HPMember) *HPEventUpdateOne
RemoveMembers removes "members" edges to HPMember entities.
func (heuo *HPEventUpdateOne) Save(ctx context.Context) (*HPEvent, error)
Save executes the query and returns the updated HPEvent entity.
func (heuo *HPEventUpdateOne) SaveX(ctx context.Context) *HPEvent
SaveX is like Save, but panics if an error occurs.
func (heuo *HPEventUpdateOne) Select(field string, fields ...string) *HPEventUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (heuo *HPEventUpdateOne) SetDisplayTitles(s []string) *HPEventUpdateOne
SetDisplayTitles sets the "display_titles" field.
func (heuo *HPEventUpdateOne) SetKey(s string) *HPEventUpdateOne
SetKey sets the "key" field.
func (heuo *HPEventUpdateOne) SetNillableOpenAt(t *time.Time) *HPEventUpdateOne
SetNillableOpenAt sets the "open_at" field if the given value is not nil.
func (heuo *HPEventUpdateOne) SetNillableSource(ees *enums.HPEventSource) *HPEventUpdateOne
SetNillableSource sets the "source" field if the given value is not nil.
func (heuo *HPEventUpdateOne) SetNillableUpdatedAt(t *time.Time) *HPEventUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (heuo *HPEventUpdateOne) SetOpenAt(t time.Time) *HPEventUpdateOne
SetOpenAt sets the "open_at" field.
func (heuo *HPEventUpdateOne) SetPrefecture(s string) *HPEventUpdateOne
SetPrefecture sets the "prefecture" field.
func (heuo *HPEventUpdateOne) SetSource(ees enums.HPEventSource) *HPEventUpdateOne
SetSource sets the "source" field.
func (heuo *HPEventUpdateOne) SetStartAt(t time.Time) *HPEventUpdateOne
SetStartAt sets the "start_at" field.
func (heuo *HPEventUpdateOne) SetUpdatedAt(t time.Time) *HPEventUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (heuo *HPEventUpdateOne) SetVenue(s string) *HPEventUpdateOne
SetVenue sets the "venue" field.
func (heuo *HPEventUpdateOne) Where(ps ...predicate.HPEvent) *HPEventUpdateOne
Where appends a list predicates to the HPEventUpdate builder.
HPEventUpsert is the "OnConflict" setter.
type HPEventUpsert struct {
*sql.UpdateSet
}
func (u *HPEventUpsert) ClearOpenAt() *HPEventUpsert
ClearOpenAt clears the value of the "open_at" field.
func (u *HPEventUpsert) ClearUpdatedAt() *HPEventUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPEventUpsert) SetDisplayTitles(v []string) *HPEventUpsert
SetDisplayTitles sets the "display_titles" field.
func (u *HPEventUpsert) SetKey(v string) *HPEventUpsert
SetKey sets the "key" field.
func (u *HPEventUpsert) SetOpenAt(v time.Time) *HPEventUpsert
SetOpenAt sets the "open_at" field.
func (u *HPEventUpsert) SetPrefecture(v string) *HPEventUpsert
SetPrefecture sets the "prefecture" field.
func (u *HPEventUpsert) SetSource(v enums.HPEventSource) *HPEventUpsert
SetSource sets the "source" field.
func (u *HPEventUpsert) SetStartAt(v time.Time) *HPEventUpsert
SetStartAt sets the "start_at" field.
func (u *HPEventUpsert) SetUpdatedAt(v time.Time) *HPEventUpsert
SetUpdatedAt sets the "updated_at" field.
func (u *HPEventUpsert) SetVenue(v string) *HPEventUpsert
SetVenue sets the "venue" field.
func (u *HPEventUpsert) UpdateDisplayTitles() *HPEventUpsert
UpdateDisplayTitles sets the "display_titles" field to the value that was provided on create.
func (u *HPEventUpsert) UpdateKey() *HPEventUpsert
UpdateKey sets the "key" field to the value that was provided on create.
func (u *HPEventUpsert) UpdateOpenAt() *HPEventUpsert
UpdateOpenAt sets the "open_at" field to the value that was provided on create.
func (u *HPEventUpsert) UpdatePrefecture() *HPEventUpsert
UpdatePrefecture sets the "prefecture" field to the value that was provided on create.
func (u *HPEventUpsert) UpdateSource() *HPEventUpsert
UpdateSource sets the "source" field to the value that was provided on create.
func (u *HPEventUpsert) UpdateStartAt() *HPEventUpsert
UpdateStartAt sets the "start_at" field to the value that was provided on create.
func (u *HPEventUpsert) UpdateUpdatedAt() *HPEventUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (u *HPEventUpsert) UpdateVenue() *HPEventUpsert
UpdateVenue sets the "venue" field to the value that was provided on create.
HPEventUpsertBulk is the builder for "upsert"-ing a bulk of HPEvent nodes.
type HPEventUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *HPEventUpsertBulk) ClearOpenAt() *HPEventUpsertBulk
ClearOpenAt clears the value of the "open_at" field.
func (u *HPEventUpsertBulk) ClearUpdatedAt() *HPEventUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPEventUpsertBulk) DoNothing() *HPEventUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPEventUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPEventUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPEventUpsertBulk) Ignore() *HPEventUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPEvent.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *HPEventUpsertBulk) SetDisplayTitles(v []string) *HPEventUpsertBulk
SetDisplayTitles sets the "display_titles" field.
func (u *HPEventUpsertBulk) SetKey(v string) *HPEventUpsertBulk
SetKey sets the "key" field.
func (u *HPEventUpsertBulk) SetOpenAt(v time.Time) *HPEventUpsertBulk
SetOpenAt sets the "open_at" field.
func (u *HPEventUpsertBulk) SetPrefecture(v string) *HPEventUpsertBulk
SetPrefecture sets the "prefecture" field.
func (u *HPEventUpsertBulk) SetSource(v enums.HPEventSource) *HPEventUpsertBulk
SetSource sets the "source" field.
func (u *HPEventUpsertBulk) SetStartAt(v time.Time) *HPEventUpsertBulk
SetStartAt sets the "start_at" field.
func (u *HPEventUpsertBulk) SetUpdatedAt(v time.Time) *HPEventUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (u *HPEventUpsertBulk) SetVenue(v string) *HPEventUpsertBulk
SetVenue sets the "venue" field.
func (u *HPEventUpsertBulk) Update(set func(*HPEventUpsert)) *HPEventUpsertBulk
Update allows overriding fields `UPDATE` values. See the HPEventCreateBulk.OnConflict documentation for more info.
func (u *HPEventUpsertBulk) UpdateDisplayTitles() *HPEventUpsertBulk
UpdateDisplayTitles sets the "display_titles" field to the value that was provided on create.
func (u *HPEventUpsertBulk) UpdateKey() *HPEventUpsertBulk
UpdateKey sets the "key" field to the value that was provided on create.
func (u *HPEventUpsertBulk) UpdateNewValues() *HPEventUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPEvent.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPEventUpsertBulk) UpdateOpenAt() *HPEventUpsertBulk
UpdateOpenAt sets the "open_at" field to the value that was provided on create.
func (u *HPEventUpsertBulk) UpdatePrefecture() *HPEventUpsertBulk
UpdatePrefecture sets the "prefecture" field to the value that was provided on create.
func (u *HPEventUpsertBulk) UpdateSource() *HPEventUpsertBulk
UpdateSource sets the "source" field to the value that was provided on create.
func (u *HPEventUpsertBulk) UpdateStartAt() *HPEventUpsertBulk
UpdateStartAt sets the "start_at" field to the value that was provided on create.
func (u *HPEventUpsertBulk) UpdateUpdatedAt() *HPEventUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (u *HPEventUpsertBulk) UpdateVenue() *HPEventUpsertBulk
UpdateVenue sets the "venue" field to the value that was provided on create.
HPEventUpsertOne is the builder for "upsert"-ing
one HPEvent node.
type HPEventUpsertOne struct {
// contains filtered or unexported fields
}
func (u *HPEventUpsertOne) ClearOpenAt() *HPEventUpsertOne
ClearOpenAt clears the value of the "open_at" field.
func (u *HPEventUpsertOne) ClearUpdatedAt() *HPEventUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPEventUpsertOne) DoNothing() *HPEventUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPEventUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPEventUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPEventUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *HPEventUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *HPEventUpsertOne) Ignore() *HPEventUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPEvent.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *HPEventUpsertOne) SetDisplayTitles(v []string) *HPEventUpsertOne
SetDisplayTitles sets the "display_titles" field.
func (u *HPEventUpsertOne) SetKey(v string) *HPEventUpsertOne
SetKey sets the "key" field.
func (u *HPEventUpsertOne) SetOpenAt(v time.Time) *HPEventUpsertOne
SetOpenAt sets the "open_at" field.
func (u *HPEventUpsertOne) SetPrefecture(v string) *HPEventUpsertOne
SetPrefecture sets the "prefecture" field.
func (u *HPEventUpsertOne) SetSource(v enums.HPEventSource) *HPEventUpsertOne
SetSource sets the "source" field.
func (u *HPEventUpsertOne) SetStartAt(v time.Time) *HPEventUpsertOne
SetStartAt sets the "start_at" field.
func (u *HPEventUpsertOne) SetUpdatedAt(v time.Time) *HPEventUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (u *HPEventUpsertOne) SetVenue(v string) *HPEventUpsertOne
SetVenue sets the "venue" field.
func (u *HPEventUpsertOne) Update(set func(*HPEventUpsert)) *HPEventUpsertOne
Update allows overriding fields `UPDATE` values. See the HPEventCreate.OnConflict documentation for more info.
func (u *HPEventUpsertOne) UpdateDisplayTitles() *HPEventUpsertOne
UpdateDisplayTitles sets the "display_titles" field to the value that was provided on create.
func (u *HPEventUpsertOne) UpdateKey() *HPEventUpsertOne
UpdateKey sets the "key" field to the value that was provided on create.
func (u *HPEventUpsertOne) UpdateNewValues() *HPEventUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPEvent.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPEventUpsertOne) UpdateOpenAt() *HPEventUpsertOne
UpdateOpenAt sets the "open_at" field to the value that was provided on create.
func (u *HPEventUpsertOne) UpdatePrefecture() *HPEventUpsertOne
UpdatePrefecture sets the "prefecture" field to the value that was provided on create.
func (u *HPEventUpsertOne) UpdateSource() *HPEventUpsertOne
UpdateSource sets the "source" field to the value that was provided on create.
func (u *HPEventUpsertOne) UpdateStartAt() *HPEventUpsertOne
UpdateStartAt sets the "start_at" field to the value that was provided on create.
func (u *HPEventUpsertOne) UpdateUpdatedAt() *HPEventUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (u *HPEventUpsertOne) UpdateVenue() *HPEventUpsertOne
UpdateVenue sets the "venue" field to the value that was provided on create.
HPEvents is a parsable slice of HPEvent.
type HPEvents []*HPEvent
HPFCEventTicket is the model entity for the HPFCEventTicket schema.
type HPFCEventTicket struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Num holds the value of the "num" field.
Num int `json:"num,omitempty"`
// Status holds the value of the "status" field.
Status enums.HPEventFCTicketStatus `json:"status,omitempty"`
// FcMemberSha256 holds the value of the "fc_member_sha256" field.
FcMemberSha256 string `json:"fc_member_sha256,omitempty"`
// ApplicationTitle holds the value of the "application_title" field.
ApplicationTitle string `json:"application_title,omitempty"`
// ApplicationID holds the value of the "application_id" field.
ApplicationID *string `json:"application_id,omitempty"`
// ApplicationStartDate holds the value of the "application_start_date" field.
ApplicationStartDate *time.Time `json:"application_start_date,omitempty"`
// ApplicationDueDate holds the value of the "application_due_date" field.
ApplicationDueDate *time.Time `json:"application_due_date,omitempty"`
// PaymentStartDate holds the value of the "payment_start_date" field.
PaymentStartDate *time.Time `json:"payment_start_date,omitempty"`
// PaymentDueDate holds the value of the "payment_due_date" field.
PaymentDueDate *time.Time `json:"payment_due_date,omitempty"`
// OwnerUserID holds the value of the "owner_user_id" field.
OwnerUserID int `json:"owner_user_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the HPFCEventTicketQuery when eager-loading is set.
Edges HPFCEventTicketEdges `json:"edges"`
// contains filtered or unexported fields
}
func (n *HPFCEventTicket) IsNode()
IsNode implements the Node interface check for GQLGen.
func (het *HPFCEventTicket) QueryEvent() *HPEventQuery
QueryEvent queries the "event" edge of the HPFCEventTicket entity.
func (het *HPFCEventTicket) QueryUser() *UserQuery
QueryUser queries the "user" edge of the HPFCEventTicket entity.
func (het *HPFCEventTicket) String() string
String implements the fmt.Stringer.
func (het *HPFCEventTicket) ToEdge(order *HPFCEventTicketOrder) *HPFCEventTicketEdge
ToEdge converts HPFCEventTicket into HPFCEventTicketEdge.
func (het *HPFCEventTicket) Unwrap() *HPFCEventTicket
Unwrap unwraps the HPFCEventTicket entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (het *HPFCEventTicket) Update() *HPFCEventTicketUpdateOne
Update returns a builder for updating this HPFCEventTicket. Note that you need to call HPFCEventTicket.Unwrap() before calling this method if this HPFCEventTicket was returned from a transaction, and the transaction was committed or rolled back.
func (het *HPFCEventTicket) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the HPFCEventTicket. This includes values selected through modifiers, order, etc.
HPFCEventTicketClient is a client for the HPFCEventTicket schema.
type HPFCEventTicketClient struct {
// contains filtered or unexported fields
}
func NewHPFCEventTicketClient(c config) *HPFCEventTicketClient
NewHPFCEventTicketClient returns a client for the HPFCEventTicket from the given config.
func (c *HPFCEventTicketClient) Create() *HPFCEventTicketCreate
Create returns a builder for creating a HPFCEventTicket entity.
func (c *HPFCEventTicketClient) CreateBulk(builders ...*HPFCEventTicketCreate) *HPFCEventTicketCreateBulk
CreateBulk returns a builder for creating a bulk of HPFCEventTicket entities.
func (c *HPFCEventTicketClient) Delete() *HPFCEventTicketDelete
Delete returns a delete builder for HPFCEventTicket.
func (c *HPFCEventTicketClient) DeleteOne(het *HPFCEventTicket) *HPFCEventTicketDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *HPFCEventTicketClient) DeleteOneID(id int) *HPFCEventTicketDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *HPFCEventTicketClient) Get(ctx context.Context, id int) (*HPFCEventTicket, error)
Get returns a HPFCEventTicket entity by its id.
func (c *HPFCEventTicketClient) GetX(ctx context.Context, id int) *HPFCEventTicket
GetX is like Get, but panics if an error occurs.
func (c *HPFCEventTicketClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *HPFCEventTicketClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hpfceventticket.Intercept(f(g(h())))`.
func (c *HPFCEventTicketClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *HPFCEventTicketClient) Query() *HPFCEventTicketQuery
Query returns a query builder for HPFCEventTicket.
func (c *HPFCEventTicketClient) QueryEvent(het *HPFCEventTicket) *HPEventQuery
QueryEvent queries the event edge of a HPFCEventTicket.
func (c *HPFCEventTicketClient) QueryUser(het *HPFCEventTicket) *UserQuery
QueryUser queries the user edge of a HPFCEventTicket.
func (c *HPFCEventTicketClient) Update() *HPFCEventTicketUpdate
Update returns an update builder for HPFCEventTicket.
func (c *HPFCEventTicketClient) UpdateOne(het *HPFCEventTicket) *HPFCEventTicketUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *HPFCEventTicketClient) UpdateOneID(id int) *HPFCEventTicketUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *HPFCEventTicketClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hpfceventticket.Hooks(f(g(h())))`.
HPFCEventTicketConnection is the connection containing edges to HPFCEventTicket.
type HPFCEventTicketConnection struct {
Edges []*HPFCEventTicketEdge `json:"edges"`
PageInfo PageInfo `json:"pageInfo"`
TotalCount int `json:"totalCount"`
}
HPFCEventTicketCreate is the builder for creating a HPFCEventTicket entity.
type HPFCEventTicketCreate struct {
// contains filtered or unexported fields
}
func (hetc *HPFCEventTicketCreate) Exec(ctx context.Context) error
Exec executes the query.
func (hetc *HPFCEventTicketCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hetc *HPFCEventTicketCreate) Mutation() *HPFCEventTicketMutation
Mutation returns the HPFCEventTicketMutation object of the builder.
func (hetc *HPFCEventTicketCreate) OnConflict(opts ...sql.ConflictOption) *HPFCEventTicketUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPFCEventTicket.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPFCEventTicketUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (hetc *HPFCEventTicketCreate) OnConflictColumns(columns ...string) *HPFCEventTicketUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPFCEventTicket.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hetc *HPFCEventTicketCreate) Save(ctx context.Context) (*HPFCEventTicket, error)
Save creates the HPFCEventTicket in the database.
func (hetc *HPFCEventTicketCreate) SaveX(ctx context.Context) *HPFCEventTicket
SaveX calls Save and panics if Save returns an error.
func (hetc *HPFCEventTicketCreate) SetApplicationDueDate(t time.Time) *HPFCEventTicketCreate
SetApplicationDueDate sets the "application_due_date" field.
func (hetc *HPFCEventTicketCreate) SetApplicationID(s string) *HPFCEventTicketCreate
SetApplicationID sets the "application_id" field.
func (hetc *HPFCEventTicketCreate) SetApplicationStartDate(t time.Time) *HPFCEventTicketCreate
SetApplicationStartDate sets the "application_start_date" field.
func (hetc *HPFCEventTicketCreate) SetApplicationTitle(s string) *HPFCEventTicketCreate
SetApplicationTitle sets the "application_title" field.
func (hetc *HPFCEventTicketCreate) SetCreatedAt(t time.Time) *HPFCEventTicketCreate
SetCreatedAt sets the "created_at" field.
func (hetc *HPFCEventTicketCreate) SetEvent(h *HPEvent) *HPFCEventTicketCreate
SetEvent sets the "event" edge to the HPEvent entity.
func (hetc *HPFCEventTicketCreate) SetEventID(id int) *HPFCEventTicketCreate
SetEventID sets the "event" edge to the HPEvent entity by ID.
func (hetc *HPFCEventTicketCreate) SetFcMemberSha256(s string) *HPFCEventTicketCreate
SetFcMemberSha256 sets the "fc_member_sha256" field.
func (hetc *HPFCEventTicketCreate) SetNillableApplicationDueDate(t *time.Time) *HPFCEventTicketCreate
SetNillableApplicationDueDate sets the "application_due_date" field if the given value is not nil.
func (hetc *HPFCEventTicketCreate) SetNillableApplicationID(s *string) *HPFCEventTicketCreate
SetNillableApplicationID sets the "application_id" field if the given value is not nil.
func (hetc *HPFCEventTicketCreate) SetNillableApplicationStartDate(t *time.Time) *HPFCEventTicketCreate
SetNillableApplicationStartDate sets the "application_start_date" field if the given value is not nil.
func (hetc *HPFCEventTicketCreate) SetNillableCreatedAt(t *time.Time) *HPFCEventTicketCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (hetc *HPFCEventTicketCreate) SetNillableEventID(id *int) *HPFCEventTicketCreate
SetNillableEventID sets the "event" edge to the HPEvent entity by ID if the given value is not nil.
func (hetc *HPFCEventTicketCreate) SetNillablePaymentDueDate(t *time.Time) *HPFCEventTicketCreate
SetNillablePaymentDueDate sets the "payment_due_date" field if the given value is not nil.
func (hetc *HPFCEventTicketCreate) SetNillablePaymentStartDate(t *time.Time) *HPFCEventTicketCreate
SetNillablePaymentStartDate sets the "payment_start_date" field if the given value is not nil.
func (hetc *HPFCEventTicketCreate) SetNillableStatus(eefts *enums.HPEventFCTicketStatus) *HPFCEventTicketCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (hetc *HPFCEventTicketCreate) SetNillableUpdatedAt(t *time.Time) *HPFCEventTicketCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hetc *HPFCEventTicketCreate) SetNum(i int) *HPFCEventTicketCreate
SetNum sets the "num" field.
func (hetc *HPFCEventTicketCreate) SetOwnerUserID(i int) *HPFCEventTicketCreate
SetOwnerUserID sets the "owner_user_id" field.
func (hetc *HPFCEventTicketCreate) SetPaymentDueDate(t time.Time) *HPFCEventTicketCreate
SetPaymentDueDate sets the "payment_due_date" field.
func (hetc *HPFCEventTicketCreate) SetPaymentStartDate(t time.Time) *HPFCEventTicketCreate
SetPaymentStartDate sets the "payment_start_date" field.
func (hetc *HPFCEventTicketCreate) SetStatus(eefts enums.HPEventFCTicketStatus) *HPFCEventTicketCreate
SetStatus sets the "status" field.
func (hetc *HPFCEventTicketCreate) SetUpdatedAt(t time.Time) *HPFCEventTicketCreate
SetUpdatedAt sets the "updated_at" field.
func (hetc *HPFCEventTicketCreate) SetUser(u *User) *HPFCEventTicketCreate
SetUser sets the "user" edge to the User entity.
func (hetc *HPFCEventTicketCreate) SetUserID(id int) *HPFCEventTicketCreate
SetUserID sets the "user" edge to the User entity by ID.
HPFCEventTicketCreateBulk is the builder for creating many HPFCEventTicket entities in bulk.
type HPFCEventTicketCreateBulk struct {
// contains filtered or unexported fields
}
func (hetcb *HPFCEventTicketCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (hetcb *HPFCEventTicketCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hetcb *HPFCEventTicketCreateBulk) OnConflict(opts ...sql.ConflictOption) *HPFCEventTicketUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPFCEventTicket.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPFCEventTicketUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (hetcb *HPFCEventTicketCreateBulk) OnConflictColumns(columns ...string) *HPFCEventTicketUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPFCEventTicket.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hetcb *HPFCEventTicketCreateBulk) Save(ctx context.Context) ([]*HPFCEventTicket, error)
Save creates the HPFCEventTicket entities in the database.
func (hetcb *HPFCEventTicketCreateBulk) SaveX(ctx context.Context) []*HPFCEventTicket
SaveX is like Save, but panics if an error occurs.
HPFCEventTicketDelete is the builder for deleting a HPFCEventTicket entity.
type HPFCEventTicketDelete struct {
// contains filtered or unexported fields
}
func (hetd *HPFCEventTicketDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (hetd *HPFCEventTicketDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (hetd *HPFCEventTicketDelete) Where(ps ...predicate.HPFCEventTicket) *HPFCEventTicketDelete
Where appends a list predicates to the HPFCEventTicketDelete builder.
HPFCEventTicketDeleteOne is the builder for deleting a single HPFCEventTicket entity.
type HPFCEventTicketDeleteOne struct {
// contains filtered or unexported fields
}
func (hetdo *HPFCEventTicketDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (hetdo *HPFCEventTicketDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hetdo *HPFCEventTicketDeleteOne) Where(ps ...predicate.HPFCEventTicket) *HPFCEventTicketDeleteOne
Where appends a list predicates to the HPFCEventTicketDelete builder.
HPFCEventTicketEdge is the edge representation of HPFCEventTicket.
type HPFCEventTicketEdge struct {
Node *HPFCEventTicket `json:"node"`
Cursor Cursor `json:"cursor"`
}
HPFCEventTicketEdges holds the relations/edges for other nodes in the graph.
type HPFCEventTicketEdges struct {
// Event holds the value of the event edge.
Event *HPEvent `json:"event,omitempty"`
// User holds the value of the user edge.
User *User `json:"user,omitempty"`
// contains filtered or unexported fields
}
func (e HPFCEventTicketEdges) EventOrErr() (*HPEvent, error)
EventOrErr returns the Event value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (e HPFCEventTicketEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
HPFCEventTicketFilter provides a generic filtering capability at runtime for HPFCEventTicketQuery.
type HPFCEventTicketFilter struct {
// contains filtered or unexported fields
}
func (f *HPFCEventTicketFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *HPFCEventTicketFilter) WhereApplicationDueDate(p entql.TimeP)
WhereApplicationDueDate applies the entql time.Time predicate on the application_due_date field.
func (f *HPFCEventTicketFilter) WhereApplicationID(p entql.StringP)
WhereApplicationID applies the entql string predicate on the application_id field.
func (f *HPFCEventTicketFilter) WhereApplicationStartDate(p entql.TimeP)
WhereApplicationStartDate applies the entql time.Time predicate on the application_start_date field.
func (f *HPFCEventTicketFilter) WhereApplicationTitle(p entql.StringP)
WhereApplicationTitle applies the entql string predicate on the application_title field.
func (f *HPFCEventTicketFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (f *HPFCEventTicketFilter) WhereFcMemberSha256(p entql.StringP)
WhereFcMemberSha256 applies the entql string predicate on the fc_member_sha256 field.
func (f *HPFCEventTicketFilter) WhereHasEvent()
WhereHasEvent applies a predicate to check if query has an edge event.
func (f *HPFCEventTicketFilter) WhereHasEventWith(preds ...predicate.HPEvent)
WhereHasEventWith applies a predicate to check if query has an edge event with a given conditions (other predicates).
func (f *HPFCEventTicketFilter) WhereHasUser()
WhereHasUser applies a predicate to check if query has an edge user.
func (f *HPFCEventTicketFilter) WhereHasUserWith(preds ...predicate.User)
WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).
func (f *HPFCEventTicketFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *HPFCEventTicketFilter) WhereNum(p entql.IntP)
WhereNum applies the entql int predicate on the num field.
func (f *HPFCEventTicketFilter) WhereOwnerUserID(p entql.IntP)
WhereOwnerUserID applies the entql int predicate on the owner_user_id field.
func (f *HPFCEventTicketFilter) WherePaymentDueDate(p entql.TimeP)
WherePaymentDueDate applies the entql time.Time predicate on the payment_due_date field.
func (f *HPFCEventTicketFilter) WherePaymentStartDate(p entql.TimeP)
WherePaymentStartDate applies the entql time.Time predicate on the payment_start_date field.
func (f *HPFCEventTicketFilter) WhereStatus(p entql.StringP)
WhereStatus applies the entql string predicate on the status field.
func (f *HPFCEventTicketFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
HPFCEventTicketGroupBy is the group-by builder for HPFCEventTicket entities.
type HPFCEventTicketGroupBy struct {
// contains filtered or unexported fields
}
func (hetgb *HPFCEventTicketGroupBy) Aggregate(fns ...AggregateFunc) *HPFCEventTicketGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *HPFCEventTicketGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPFCEventTicketGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPFCEventTicketGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPFCEventTicketGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPFCEventTicketGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPFCEventTicketGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPFCEventTicketGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPFCEventTicketGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPFCEventTicketGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPFCEventTicketGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPFCEventTicketGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPFCEventTicketGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hetgb *HPFCEventTicketGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPFCEventTicketGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPFCEventTicketGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPFCEventTicketGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPFCEventTicketGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPFCEventTicketGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPFCEventTicketMutation represents an operation that mutates the HPFCEventTicket nodes in the graph.
type HPFCEventTicketMutation struct {
// contains filtered or unexported fields
}
func (m *HPFCEventTicketMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPFCEventTicketMutation) AddNum(i int)
AddNum adds i to the "num" field.
func (m *HPFCEventTicketMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *HPFCEventTicketMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPFCEventTicketMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *HPFCEventTicketMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *HPFCEventTicketMutation) AddedNum() (r int, exists bool)
AddedNum returns the value that was added to the "num" field in this mutation.
func (m *HPFCEventTicketMutation) ApplicationDueDate() (r time.Time, exists bool)
ApplicationDueDate returns the value of the "application_due_date" field in the mutation.
func (m *HPFCEventTicketMutation) ApplicationDueDateCleared() bool
ApplicationDueDateCleared returns if the "application_due_date" field was cleared in this mutation.
func (m *HPFCEventTicketMutation) ApplicationID() (r string, exists bool)
ApplicationID returns the value of the "application_id" field in the mutation.
func (m *HPFCEventTicketMutation) ApplicationIDCleared() bool
ApplicationIDCleared returns if the "application_id" field was cleared in this mutation.
func (m *HPFCEventTicketMutation) ApplicationStartDate() (r time.Time, exists bool)
ApplicationStartDate returns the value of the "application_start_date" field in the mutation.
func (m *HPFCEventTicketMutation) ApplicationStartDateCleared() bool
ApplicationStartDateCleared returns if the "application_start_date" field was cleared in this mutation.
func (m *HPFCEventTicketMutation) ApplicationTitle() (r string, exists bool)
ApplicationTitle returns the value of the "application_title" field in the mutation.
func (m *HPFCEventTicketMutation) ClearApplicationDueDate()
ClearApplicationDueDate clears the value of the "application_due_date" field.
func (m *HPFCEventTicketMutation) ClearApplicationID()
ClearApplicationID clears the value of the "application_id" field.
func (m *HPFCEventTicketMutation) ClearApplicationStartDate()
ClearApplicationStartDate clears the value of the "application_start_date" field.
func (m *HPFCEventTicketMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (m *HPFCEventTicketMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *HPFCEventTicketMutation) ClearEvent()
ClearEvent clears the "event" edge to the HPEvent entity.
func (m *HPFCEventTicketMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPFCEventTicketMutation) ClearPaymentDueDate()
ClearPaymentDueDate clears the value of the "payment_due_date" field.
func (m *HPFCEventTicketMutation) ClearPaymentStartDate()
ClearPaymentStartDate clears the value of the "payment_start_date" field.
func (m *HPFCEventTicketMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (m *HPFCEventTicketMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (m *HPFCEventTicketMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *HPFCEventTicketMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m HPFCEventTicketMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *HPFCEventTicketMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (m *HPFCEventTicketMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (m *HPFCEventTicketMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *HPFCEventTicketMutation) EventCleared() bool
EventCleared reports if the "event" edge to the HPEvent entity was cleared.
func (m *HPFCEventTicketMutation) EventID() (id int, exists bool)
EventID returns the "event" edge ID in the mutation.
func (m *HPFCEventTicketMutation) EventIDs() (ids []int)
EventIDs returns the "event" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EventID instead. It exists only for internal usage by the builders.
func (m *HPFCEventTicketMutation) FcMemberSha256() (r string, exists bool)
FcMemberSha256 returns the value of the "fc_member_sha256" field in the mutation.
func (m *HPFCEventTicketMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPFCEventTicketMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *HPFCEventTicketMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *HPFCEventTicketMutation) Filter() *HPFCEventTicketFilter
Filter returns an entql.Where implementation to apply filters on the HPFCEventTicketMutation builder.
func (m *HPFCEventTicketMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *HPFCEventTicketMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *HPFCEventTicketMutation) Num() (r int, exists bool)
Num returns the value of the "num" field in the mutation.
func (m *HPFCEventTicketMutation) OldApplicationDueDate(ctx context.Context) (v *time.Time, err error)
OldApplicationDueDate returns the old "application_due_date" field's value of the HPFCEventTicket entity. If the HPFCEventTicket object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFCEventTicketMutation) OldApplicationID(ctx context.Context) (v *string, err error)
OldApplicationID returns the old "application_id" field's value of the HPFCEventTicket entity. If the HPFCEventTicket object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFCEventTicketMutation) OldApplicationStartDate(ctx context.Context) (v *time.Time, err error)
OldApplicationStartDate returns the old "application_start_date" field's value of the HPFCEventTicket entity. If the HPFCEventTicket object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFCEventTicketMutation) OldApplicationTitle(ctx context.Context) (v string, err error)
OldApplicationTitle returns the old "application_title" field's value of the HPFCEventTicket entity. If the HPFCEventTicket object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFCEventTicketMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
OldCreatedAt returns the old "created_at" field's value of the HPFCEventTicket entity. If the HPFCEventTicket object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFCEventTicketMutation) OldFcMemberSha256(ctx context.Context) (v string, err error)
OldFcMemberSha256 returns the old "fc_member_sha256" field's value of the HPFCEventTicket entity. If the HPFCEventTicket object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFCEventTicketMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *HPFCEventTicketMutation) OldNum(ctx context.Context) (v int, err error)
OldNum returns the old "num" field's value of the HPFCEventTicket entity. If the HPFCEventTicket object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFCEventTicketMutation) OldOwnerUserID(ctx context.Context) (v int, err error)
OldOwnerUserID returns the old "owner_user_id" field's value of the HPFCEventTicket entity. If the HPFCEventTicket object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFCEventTicketMutation) OldPaymentDueDate(ctx context.Context) (v *time.Time, err error)
OldPaymentDueDate returns the old "payment_due_date" field's value of the HPFCEventTicket entity. If the HPFCEventTicket object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFCEventTicketMutation) OldPaymentStartDate(ctx context.Context) (v *time.Time, err error)
OldPaymentStartDate returns the old "payment_start_date" field's value of the HPFCEventTicket entity. If the HPFCEventTicket object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFCEventTicketMutation) OldStatus(ctx context.Context) (v enums.HPEventFCTicketStatus, err error)
OldStatus returns the old "status" field's value of the HPFCEventTicket entity. If the HPFCEventTicket object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFCEventTicketMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
OldUpdatedAt returns the old "updated_at" field's value of the HPFCEventTicket entity. If the HPFCEventTicket object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFCEventTicketMutation) Op() Op
Op returns the operation name.
func (m *HPFCEventTicketMutation) OwnerUserID() (r int, exists bool)
OwnerUserID returns the value of the "owner_user_id" field in the mutation.
func (m *HPFCEventTicketMutation) PaymentDueDate() (r time.Time, exists bool)
PaymentDueDate returns the value of the "payment_due_date" field in the mutation.
func (m *HPFCEventTicketMutation) PaymentDueDateCleared() bool
PaymentDueDateCleared returns if the "payment_due_date" field was cleared in this mutation.
func (m *HPFCEventTicketMutation) PaymentStartDate() (r time.Time, exists bool)
PaymentStartDate returns the value of the "payment_start_date" field in the mutation.
func (m *HPFCEventTicketMutation) PaymentStartDateCleared() bool
PaymentStartDateCleared returns if the "payment_start_date" field was cleared in this mutation.
func (m *HPFCEventTicketMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *HPFCEventTicketMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *HPFCEventTicketMutation) ResetApplicationDueDate()
ResetApplicationDueDate resets all changes to the "application_due_date" field.
func (m *HPFCEventTicketMutation) ResetApplicationID()
ResetApplicationID resets all changes to the "application_id" field.
func (m *HPFCEventTicketMutation) ResetApplicationStartDate()
ResetApplicationStartDate resets all changes to the "application_start_date" field.
func (m *HPFCEventTicketMutation) ResetApplicationTitle()
ResetApplicationTitle resets all changes to the "application_title" field.
func (m *HPFCEventTicketMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (m *HPFCEventTicketMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *HPFCEventTicketMutation) ResetEvent()
ResetEvent resets all changes to the "event" edge.
func (m *HPFCEventTicketMutation) ResetFcMemberSha256()
ResetFcMemberSha256 resets all changes to the "fc_member_sha256" field.
func (m *HPFCEventTicketMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPFCEventTicketMutation) ResetNum()
ResetNum resets all changes to the "num" field.
func (m *HPFCEventTicketMutation) ResetOwnerUserID()
ResetOwnerUserID resets all changes to the "owner_user_id" field.
func (m *HPFCEventTicketMutation) ResetPaymentDueDate()
ResetPaymentDueDate resets all changes to the "payment_due_date" field.
func (m *HPFCEventTicketMutation) ResetPaymentStartDate()
ResetPaymentStartDate resets all changes to the "payment_start_date" field.
func (m *HPFCEventTicketMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (m *HPFCEventTicketMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (m *HPFCEventTicketMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (m *HPFCEventTicketMutation) SetApplicationDueDate(t time.Time)
SetApplicationDueDate sets the "application_due_date" field.
func (m *HPFCEventTicketMutation) SetApplicationID(s string)
SetApplicationID sets the "application_id" field.
func (m *HPFCEventTicketMutation) SetApplicationStartDate(t time.Time)
SetApplicationStartDate sets the "application_start_date" field.
func (m *HPFCEventTicketMutation) SetApplicationTitle(s string)
SetApplicationTitle sets the "application_title" field.
func (m *HPFCEventTicketMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (m *HPFCEventTicketMutation) SetEventID(id int)
SetEventID sets the "event" edge to the HPEvent entity by id.
func (m *HPFCEventTicketMutation) SetFcMemberSha256(s string)
SetFcMemberSha256 sets the "fc_member_sha256" field.
func (m *HPFCEventTicketMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPFCEventTicketMutation) SetNum(i int)
SetNum sets the "num" field.
func (m *HPFCEventTicketMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *HPFCEventTicketMutation) SetOwnerUserID(i int)
SetOwnerUserID sets the "owner_user_id" field.
func (m *HPFCEventTicketMutation) SetPaymentDueDate(t time.Time)
SetPaymentDueDate sets the "payment_due_date" field.
func (m *HPFCEventTicketMutation) SetPaymentStartDate(t time.Time)
SetPaymentStartDate sets the "payment_start_date" field.
func (m *HPFCEventTicketMutation) SetStatus(eefts enums.HPEventFCTicketStatus)
SetStatus sets the "status" field.
func (m *HPFCEventTicketMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (m *HPFCEventTicketMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (m *HPFCEventTicketMutation) Status() (r enums.HPEventFCTicketStatus, exists bool)
Status returns the value of the "status" field in the mutation.
func (m HPFCEventTicketMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *HPFCEventTicketMutation) Type() string
Type returns the node type of this mutation (HPFCEventTicket).
func (m *HPFCEventTicketMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (m *HPFCEventTicketMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (m *HPFCEventTicketMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (m *HPFCEventTicketMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (m *HPFCEventTicketMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (m *HPFCEventTicketMutation) Where(ps ...predicate.HPFCEventTicket)
Where appends a list predicates to the HPFCEventTicketMutation builder.
func (m *HPFCEventTicketMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HPFCEventTicketMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
HPFCEventTicketOrder defines the ordering of HPFCEventTicket.
type HPFCEventTicketOrder struct {
Direction OrderDirection `json:"direction"`
Field *HPFCEventTicketOrderField `json:"field"`
}
HPFCEventTicketOrderField defines the ordering field of HPFCEventTicket.
type HPFCEventTicketOrderField struct {
// contains filtered or unexported fields
}
HPFCEventTicketPaginateOption enables pagination customization.
type HPFCEventTicketPaginateOption func(*hpfceventticketPager) error
func WithHPFCEventTicketFilter(filter func(*HPFCEventTicketQuery) (*HPFCEventTicketQuery, error)) HPFCEventTicketPaginateOption
WithHPFCEventTicketFilter configures pagination filter.
func WithHPFCEventTicketOrder(order *HPFCEventTicketOrder) HPFCEventTicketPaginateOption
WithHPFCEventTicketOrder configures pagination ordering.
HPFCEventTicketQuery is the builder for querying HPFCEventTicket entities.
type HPFCEventTicketQuery struct {
// contains filtered or unexported fields
}
func (hetq *HPFCEventTicketQuery) Aggregate(fns ...AggregateFunc) *HPFCEventTicketSelect
Aggregate returns a HPFCEventTicketSelect configured with the given aggregations.
func (hetq *HPFCEventTicketQuery) All(ctx context.Context) ([]*HPFCEventTicket, error)
All executes the query and returns a list of HPFCEventTickets.
func (hetq *HPFCEventTicketQuery) AllX(ctx context.Context) []*HPFCEventTicket
AllX is like All, but panics if an error occurs.
func (hetq *HPFCEventTicketQuery) Clone() *HPFCEventTicketQuery
Clone returns a duplicate of the HPFCEventTicketQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (het *HPFCEventTicketQuery) CollectFields(ctx context.Context, satisfies ...string) (*HPFCEventTicketQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (hetq *HPFCEventTicketQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (hetq *HPFCEventTicketQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (hetq *HPFCEventTicketQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (hetq *HPFCEventTicketQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (hetq *HPFCEventTicketQuery) Filter() *HPFCEventTicketFilter
Filter returns a Filter implementation to apply filters on the HPFCEventTicketQuery builder.
func (hetq *HPFCEventTicketQuery) First(ctx context.Context) (*HPFCEventTicket, error)
First returns the first HPFCEventTicket entity from the query. Returns a *NotFoundError when no HPFCEventTicket was found.
func (hetq *HPFCEventTicketQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first HPFCEventTicket ID from the query. Returns a *NotFoundError when no HPFCEventTicket ID was found.
func (hetq *HPFCEventTicketQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (hetq *HPFCEventTicketQuery) FirstX(ctx context.Context) *HPFCEventTicket
FirstX is like First, but panics if an error occurs.
func (hetq *HPFCEventTicketQuery) GroupBy(field string, fields ...string) *HPFCEventTicketGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.HPFCEventTicket.Query().
GroupBy(hpfceventticket.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (hetq *HPFCEventTicketQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of HPFCEventTicket IDs.
func (hetq *HPFCEventTicketQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (hetq *HPFCEventTicketQuery) Limit(limit int) *HPFCEventTicketQuery
Limit the number of records to be returned by this query.
func (hetq *HPFCEventTicketQuery) Offset(offset int) *HPFCEventTicketQuery
Offset to start from.
func (hetq *HPFCEventTicketQuery) Only(ctx context.Context) (*HPFCEventTicket, error)
Only returns a single HPFCEventTicket entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HPFCEventTicket entity is found. Returns a *NotFoundError when no HPFCEventTicket entities are found.
func (hetq *HPFCEventTicketQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only HPFCEventTicket ID in the query. Returns a *NotSingularError when more than one HPFCEventTicket ID is found. Returns a *NotFoundError when no entities are found.
func (hetq *HPFCEventTicketQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (hetq *HPFCEventTicketQuery) OnlyX(ctx context.Context) *HPFCEventTicket
OnlyX is like Only, but panics if an error occurs.
func (hetq *HPFCEventTicketQuery) Order(o ...hpfceventticket.Order) *HPFCEventTicketQuery
Order specifies how the records should be ordered.
func (het *HPFCEventTicketQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...HPFCEventTicketPaginateOption, ) (*HPFCEventTicketConnection, error)
Paginate executes the query and returns a relay based cursor connection to HPFCEventTicket.
func (hetq *HPFCEventTicketQuery) QueryEvent() *HPEventQuery
QueryEvent chains the current query on the "event" edge.
func (hetq *HPFCEventTicketQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (hetq *HPFCEventTicketQuery) Select(fields ...string) *HPFCEventTicketSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.HPFCEventTicket.Query().
Select(hpfceventticket.FieldCreatedAt).
Scan(ctx, &v)
func (hetq *HPFCEventTicketQuery) Unique(unique bool) *HPFCEventTicketQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (hetq *HPFCEventTicketQuery) Where(ps ...predicate.HPFCEventTicket) *HPFCEventTicketQuery
Where adds a new predicate for the HPFCEventTicketQuery builder.
func (hetq *HPFCEventTicketQuery) WithEvent(opts ...func(*HPEventQuery)) *HPFCEventTicketQuery
WithEvent tells the query-builder to eager-load the nodes that are connected to the "event" edge. The optional arguments are used to configure the query builder of the edge.
func (hetq *HPFCEventTicketQuery) WithUser(opts ...func(*UserQuery)) *HPFCEventTicketQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
HPFCEventTicketSelect is the builder for selecting fields of HPFCEventTicket entities.
type HPFCEventTicketSelect struct {
*HPFCEventTicketQuery
// contains filtered or unexported fields
}
func (hets *HPFCEventTicketSelect) Aggregate(fns ...AggregateFunc) *HPFCEventTicketSelect
Aggregate adds the given aggregation functions to the selector query.
func (s *HPFCEventTicketSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPFCEventTicketSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPFCEventTicketSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPFCEventTicketSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPFCEventTicketSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPFCEventTicketSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPFCEventTicketSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPFCEventTicketSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPFCEventTicketSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPFCEventTicketSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPFCEventTicketSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPFCEventTicketSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hets *HPFCEventTicketSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPFCEventTicketSelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPFCEventTicketSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPFCEventTicketSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPFCEventTicketSelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPFCEventTicketSelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPFCEventTicketUpdate is the builder for updating HPFCEventTicket entities.
type HPFCEventTicketUpdate struct {
// contains filtered or unexported fields
}
func (hetu *HPFCEventTicketUpdate) AddNum(i int) *HPFCEventTicketUpdate
AddNum adds i to the "num" field.
func (hetu *HPFCEventTicketUpdate) ClearApplicationDueDate() *HPFCEventTicketUpdate
ClearApplicationDueDate clears the value of the "application_due_date" field.
func (hetu *HPFCEventTicketUpdate) ClearApplicationID() *HPFCEventTicketUpdate
ClearApplicationID clears the value of the "application_id" field.
func (hetu *HPFCEventTicketUpdate) ClearApplicationStartDate() *HPFCEventTicketUpdate
ClearApplicationStartDate clears the value of the "application_start_date" field.
func (hetu *HPFCEventTicketUpdate) ClearEvent() *HPFCEventTicketUpdate
ClearEvent clears the "event" edge to the HPEvent entity.
func (hetu *HPFCEventTicketUpdate) ClearPaymentDueDate() *HPFCEventTicketUpdate
ClearPaymentDueDate clears the value of the "payment_due_date" field.
func (hetu *HPFCEventTicketUpdate) ClearPaymentStartDate() *HPFCEventTicketUpdate
ClearPaymentStartDate clears the value of the "payment_start_date" field.
func (hetu *HPFCEventTicketUpdate) ClearUpdatedAt() *HPFCEventTicketUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (hetu *HPFCEventTicketUpdate) ClearUser() *HPFCEventTicketUpdate
ClearUser clears the "user" edge to the User entity.
func (hetu *HPFCEventTicketUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (hetu *HPFCEventTicketUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hetu *HPFCEventTicketUpdate) Mutation() *HPFCEventTicketMutation
Mutation returns the HPFCEventTicketMutation object of the builder.
func (hetu *HPFCEventTicketUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (hetu *HPFCEventTicketUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (hetu *HPFCEventTicketUpdate) SetApplicationDueDate(t time.Time) *HPFCEventTicketUpdate
SetApplicationDueDate sets the "application_due_date" field.
func (hetu *HPFCEventTicketUpdate) SetApplicationID(s string) *HPFCEventTicketUpdate
SetApplicationID sets the "application_id" field.
func (hetu *HPFCEventTicketUpdate) SetApplicationStartDate(t time.Time) *HPFCEventTicketUpdate
SetApplicationStartDate sets the "application_start_date" field.
func (hetu *HPFCEventTicketUpdate) SetApplicationTitle(s string) *HPFCEventTicketUpdate
SetApplicationTitle sets the "application_title" field.
func (hetu *HPFCEventTicketUpdate) SetEvent(h *HPEvent) *HPFCEventTicketUpdate
SetEvent sets the "event" edge to the HPEvent entity.
func (hetu *HPFCEventTicketUpdate) SetEventID(id int) *HPFCEventTicketUpdate
SetEventID sets the "event" edge to the HPEvent entity by ID.
func (hetu *HPFCEventTicketUpdate) SetFcMemberSha256(s string) *HPFCEventTicketUpdate
SetFcMemberSha256 sets the "fc_member_sha256" field.
func (hetu *HPFCEventTicketUpdate) SetNillableApplicationDueDate(t *time.Time) *HPFCEventTicketUpdate
SetNillableApplicationDueDate sets the "application_due_date" field if the given value is not nil.
func (hetu *HPFCEventTicketUpdate) SetNillableApplicationID(s *string) *HPFCEventTicketUpdate
SetNillableApplicationID sets the "application_id" field if the given value is not nil.
func (hetu *HPFCEventTicketUpdate) SetNillableApplicationStartDate(t *time.Time) *HPFCEventTicketUpdate
SetNillableApplicationStartDate sets the "application_start_date" field if the given value is not nil.
func (hetu *HPFCEventTicketUpdate) SetNillableEventID(id *int) *HPFCEventTicketUpdate
SetNillableEventID sets the "event" edge to the HPEvent entity by ID if the given value is not nil.
func (hetu *HPFCEventTicketUpdate) SetNillablePaymentDueDate(t *time.Time) *HPFCEventTicketUpdate
SetNillablePaymentDueDate sets the "payment_due_date" field if the given value is not nil.
func (hetu *HPFCEventTicketUpdate) SetNillablePaymentStartDate(t *time.Time) *HPFCEventTicketUpdate
SetNillablePaymentStartDate sets the "payment_start_date" field if the given value is not nil.
func (hetu *HPFCEventTicketUpdate) SetNillableStatus(eefts *enums.HPEventFCTicketStatus) *HPFCEventTicketUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (hetu *HPFCEventTicketUpdate) SetNillableUpdatedAt(t *time.Time) *HPFCEventTicketUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hetu *HPFCEventTicketUpdate) SetNum(i int) *HPFCEventTicketUpdate
SetNum sets the "num" field.
func (hetu *HPFCEventTicketUpdate) SetOwnerUserID(i int) *HPFCEventTicketUpdate
SetOwnerUserID sets the "owner_user_id" field.
func (hetu *HPFCEventTicketUpdate) SetPaymentDueDate(t time.Time) *HPFCEventTicketUpdate
SetPaymentDueDate sets the "payment_due_date" field.
func (hetu *HPFCEventTicketUpdate) SetPaymentStartDate(t time.Time) *HPFCEventTicketUpdate
SetPaymentStartDate sets the "payment_start_date" field.
func (hetu *HPFCEventTicketUpdate) SetStatus(eefts enums.HPEventFCTicketStatus) *HPFCEventTicketUpdate
SetStatus sets the "status" field.
func (hetu *HPFCEventTicketUpdate) SetUpdatedAt(t time.Time) *HPFCEventTicketUpdate
SetUpdatedAt sets the "updated_at" field.
func (hetu *HPFCEventTicketUpdate) SetUser(u *User) *HPFCEventTicketUpdate
SetUser sets the "user" edge to the User entity.
func (hetu *HPFCEventTicketUpdate) SetUserID(id int) *HPFCEventTicketUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (hetu *HPFCEventTicketUpdate) Where(ps ...predicate.HPFCEventTicket) *HPFCEventTicketUpdate
Where appends a list predicates to the HPFCEventTicketUpdate builder.
HPFCEventTicketUpdateOne is the builder for updating a single HPFCEventTicket entity.
type HPFCEventTicketUpdateOne struct {
// contains filtered or unexported fields
}
func (hetuo *HPFCEventTicketUpdateOne) AddNum(i int) *HPFCEventTicketUpdateOne
AddNum adds i to the "num" field.
func (hetuo *HPFCEventTicketUpdateOne) ClearApplicationDueDate() *HPFCEventTicketUpdateOne
ClearApplicationDueDate clears the value of the "application_due_date" field.
func (hetuo *HPFCEventTicketUpdateOne) ClearApplicationID() *HPFCEventTicketUpdateOne
ClearApplicationID clears the value of the "application_id" field.
func (hetuo *HPFCEventTicketUpdateOne) ClearApplicationStartDate() *HPFCEventTicketUpdateOne
ClearApplicationStartDate clears the value of the "application_start_date" field.
func (hetuo *HPFCEventTicketUpdateOne) ClearEvent() *HPFCEventTicketUpdateOne
ClearEvent clears the "event" edge to the HPEvent entity.
func (hetuo *HPFCEventTicketUpdateOne) ClearPaymentDueDate() *HPFCEventTicketUpdateOne
ClearPaymentDueDate clears the value of the "payment_due_date" field.
func (hetuo *HPFCEventTicketUpdateOne) ClearPaymentStartDate() *HPFCEventTicketUpdateOne
ClearPaymentStartDate clears the value of the "payment_start_date" field.
func (hetuo *HPFCEventTicketUpdateOne) ClearUpdatedAt() *HPFCEventTicketUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (hetuo *HPFCEventTicketUpdateOne) ClearUser() *HPFCEventTicketUpdateOne
ClearUser clears the "user" edge to the User entity.
func (hetuo *HPFCEventTicketUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (hetuo *HPFCEventTicketUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hetuo *HPFCEventTicketUpdateOne) Mutation() *HPFCEventTicketMutation
Mutation returns the HPFCEventTicketMutation object of the builder.
func (hetuo *HPFCEventTicketUpdateOne) Save(ctx context.Context) (*HPFCEventTicket, error)
Save executes the query and returns the updated HPFCEventTicket entity.
func (hetuo *HPFCEventTicketUpdateOne) SaveX(ctx context.Context) *HPFCEventTicket
SaveX is like Save, but panics if an error occurs.
func (hetuo *HPFCEventTicketUpdateOne) Select(field string, fields ...string) *HPFCEventTicketUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (hetuo *HPFCEventTicketUpdateOne) SetApplicationDueDate(t time.Time) *HPFCEventTicketUpdateOne
SetApplicationDueDate sets the "application_due_date" field.
func (hetuo *HPFCEventTicketUpdateOne) SetApplicationID(s string) *HPFCEventTicketUpdateOne
SetApplicationID sets the "application_id" field.
func (hetuo *HPFCEventTicketUpdateOne) SetApplicationStartDate(t time.Time) *HPFCEventTicketUpdateOne
SetApplicationStartDate sets the "application_start_date" field.
func (hetuo *HPFCEventTicketUpdateOne) SetApplicationTitle(s string) *HPFCEventTicketUpdateOne
SetApplicationTitle sets the "application_title" field.
func (hetuo *HPFCEventTicketUpdateOne) SetEvent(h *HPEvent) *HPFCEventTicketUpdateOne
SetEvent sets the "event" edge to the HPEvent entity.
func (hetuo *HPFCEventTicketUpdateOne) SetEventID(id int) *HPFCEventTicketUpdateOne
SetEventID sets the "event" edge to the HPEvent entity by ID.
func (hetuo *HPFCEventTicketUpdateOne) SetFcMemberSha256(s string) *HPFCEventTicketUpdateOne
SetFcMemberSha256 sets the "fc_member_sha256" field.
func (hetuo *HPFCEventTicketUpdateOne) SetNillableApplicationDueDate(t *time.Time) *HPFCEventTicketUpdateOne
SetNillableApplicationDueDate sets the "application_due_date" field if the given value is not nil.
func (hetuo *HPFCEventTicketUpdateOne) SetNillableApplicationID(s *string) *HPFCEventTicketUpdateOne
SetNillableApplicationID sets the "application_id" field if the given value is not nil.
func (hetuo *HPFCEventTicketUpdateOne) SetNillableApplicationStartDate(t *time.Time) *HPFCEventTicketUpdateOne
SetNillableApplicationStartDate sets the "application_start_date" field if the given value is not nil.
func (hetuo *HPFCEventTicketUpdateOne) SetNillableEventID(id *int) *HPFCEventTicketUpdateOne
SetNillableEventID sets the "event" edge to the HPEvent entity by ID if the given value is not nil.
func (hetuo *HPFCEventTicketUpdateOne) SetNillablePaymentDueDate(t *time.Time) *HPFCEventTicketUpdateOne
SetNillablePaymentDueDate sets the "payment_due_date" field if the given value is not nil.
func (hetuo *HPFCEventTicketUpdateOne) SetNillablePaymentStartDate(t *time.Time) *HPFCEventTicketUpdateOne
SetNillablePaymentStartDate sets the "payment_start_date" field if the given value is not nil.
func (hetuo *HPFCEventTicketUpdateOne) SetNillableStatus(eefts *enums.HPEventFCTicketStatus) *HPFCEventTicketUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (hetuo *HPFCEventTicketUpdateOne) SetNillableUpdatedAt(t *time.Time) *HPFCEventTicketUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hetuo *HPFCEventTicketUpdateOne) SetNum(i int) *HPFCEventTicketUpdateOne
SetNum sets the "num" field.
func (hetuo *HPFCEventTicketUpdateOne) SetOwnerUserID(i int) *HPFCEventTicketUpdateOne
SetOwnerUserID sets the "owner_user_id" field.
func (hetuo *HPFCEventTicketUpdateOne) SetPaymentDueDate(t time.Time) *HPFCEventTicketUpdateOne
SetPaymentDueDate sets the "payment_due_date" field.
func (hetuo *HPFCEventTicketUpdateOne) SetPaymentStartDate(t time.Time) *HPFCEventTicketUpdateOne
SetPaymentStartDate sets the "payment_start_date" field.
func (hetuo *HPFCEventTicketUpdateOne) SetStatus(eefts enums.HPEventFCTicketStatus) *HPFCEventTicketUpdateOne
SetStatus sets the "status" field.
func (hetuo *HPFCEventTicketUpdateOne) SetUpdatedAt(t time.Time) *HPFCEventTicketUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (hetuo *HPFCEventTicketUpdateOne) SetUser(u *User) *HPFCEventTicketUpdateOne
SetUser sets the "user" edge to the User entity.
func (hetuo *HPFCEventTicketUpdateOne) SetUserID(id int) *HPFCEventTicketUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (hetuo *HPFCEventTicketUpdateOne) Where(ps ...predicate.HPFCEventTicket) *HPFCEventTicketUpdateOne
Where appends a list predicates to the HPFCEventTicketUpdate builder.
HPFCEventTicketUpsert is the "OnConflict" setter.
type HPFCEventTicketUpsert struct {
*sql.UpdateSet
}
func (u *HPFCEventTicketUpsert) AddNum(v int) *HPFCEventTicketUpsert
AddNum adds v to the "num" field.
func (u *HPFCEventTicketUpsert) ClearApplicationDueDate() *HPFCEventTicketUpsert
ClearApplicationDueDate clears the value of the "application_due_date" field.
func (u *HPFCEventTicketUpsert) ClearApplicationID() *HPFCEventTicketUpsert
ClearApplicationID clears the value of the "application_id" field.
func (u *HPFCEventTicketUpsert) ClearApplicationStartDate() *HPFCEventTicketUpsert
ClearApplicationStartDate clears the value of the "application_start_date" field.
func (u *HPFCEventTicketUpsert) ClearPaymentDueDate() *HPFCEventTicketUpsert
ClearPaymentDueDate clears the value of the "payment_due_date" field.
func (u *HPFCEventTicketUpsert) ClearPaymentStartDate() *HPFCEventTicketUpsert
ClearPaymentStartDate clears the value of the "payment_start_date" field.
func (u *HPFCEventTicketUpsert) ClearUpdatedAt() *HPFCEventTicketUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPFCEventTicketUpsert) SetApplicationDueDate(v time.Time) *HPFCEventTicketUpsert
SetApplicationDueDate sets the "application_due_date" field.
func (u *HPFCEventTicketUpsert) SetApplicationID(v string) *HPFCEventTicketUpsert
SetApplicationID sets the "application_id" field.
func (u *HPFCEventTicketUpsert) SetApplicationStartDate(v time.Time) *HPFCEventTicketUpsert
SetApplicationStartDate sets the "application_start_date" field.
func (u *HPFCEventTicketUpsert) SetApplicationTitle(v string) *HPFCEventTicketUpsert
SetApplicationTitle sets the "application_title" field.
func (u *HPFCEventTicketUpsert) SetFcMemberSha256(v string) *HPFCEventTicketUpsert
SetFcMemberSha256 sets the "fc_member_sha256" field.
func (u *HPFCEventTicketUpsert) SetNum(v int) *HPFCEventTicketUpsert
SetNum sets the "num" field.
func (u *HPFCEventTicketUpsert) SetOwnerUserID(v int) *HPFCEventTicketUpsert
SetOwnerUserID sets the "owner_user_id" field.
func (u *HPFCEventTicketUpsert) SetPaymentDueDate(v time.Time) *HPFCEventTicketUpsert
SetPaymentDueDate sets the "payment_due_date" field.
func (u *HPFCEventTicketUpsert) SetPaymentStartDate(v time.Time) *HPFCEventTicketUpsert
SetPaymentStartDate sets the "payment_start_date" field.
func (u *HPFCEventTicketUpsert) SetStatus(v enums.HPEventFCTicketStatus) *HPFCEventTicketUpsert
SetStatus sets the "status" field.
func (u *HPFCEventTicketUpsert) SetUpdatedAt(v time.Time) *HPFCEventTicketUpsert
SetUpdatedAt sets the "updated_at" field.
func (u *HPFCEventTicketUpsert) UpdateApplicationDueDate() *HPFCEventTicketUpsert
UpdateApplicationDueDate sets the "application_due_date" field to the value that was provided on create.
func (u *HPFCEventTicketUpsert) UpdateApplicationID() *HPFCEventTicketUpsert
UpdateApplicationID sets the "application_id" field to the value that was provided on create.
func (u *HPFCEventTicketUpsert) UpdateApplicationStartDate() *HPFCEventTicketUpsert
UpdateApplicationStartDate sets the "application_start_date" field to the value that was provided on create.
func (u *HPFCEventTicketUpsert) UpdateApplicationTitle() *HPFCEventTicketUpsert
UpdateApplicationTitle sets the "application_title" field to the value that was provided on create.
func (u *HPFCEventTicketUpsert) UpdateFcMemberSha256() *HPFCEventTicketUpsert
UpdateFcMemberSha256 sets the "fc_member_sha256" field to the value that was provided on create.
func (u *HPFCEventTicketUpsert) UpdateNum() *HPFCEventTicketUpsert
UpdateNum sets the "num" field to the value that was provided on create.
func (u *HPFCEventTicketUpsert) UpdateOwnerUserID() *HPFCEventTicketUpsert
UpdateOwnerUserID sets the "owner_user_id" field to the value that was provided on create.
func (u *HPFCEventTicketUpsert) UpdatePaymentDueDate() *HPFCEventTicketUpsert
UpdatePaymentDueDate sets the "payment_due_date" field to the value that was provided on create.
func (u *HPFCEventTicketUpsert) UpdatePaymentStartDate() *HPFCEventTicketUpsert
UpdatePaymentStartDate sets the "payment_start_date" field to the value that was provided on create.
func (u *HPFCEventTicketUpsert) UpdateStatus() *HPFCEventTicketUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
func (u *HPFCEventTicketUpsert) UpdateUpdatedAt() *HPFCEventTicketUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPFCEventTicketUpsertBulk is the builder for "upsert"-ing a bulk of HPFCEventTicket nodes.
type HPFCEventTicketUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *HPFCEventTicketUpsertBulk) AddNum(v int) *HPFCEventTicketUpsertBulk
AddNum adds v to the "num" field.
func (u *HPFCEventTicketUpsertBulk) ClearApplicationDueDate() *HPFCEventTicketUpsertBulk
ClearApplicationDueDate clears the value of the "application_due_date" field.
func (u *HPFCEventTicketUpsertBulk) ClearApplicationID() *HPFCEventTicketUpsertBulk
ClearApplicationID clears the value of the "application_id" field.
func (u *HPFCEventTicketUpsertBulk) ClearApplicationStartDate() *HPFCEventTicketUpsertBulk
ClearApplicationStartDate clears the value of the "application_start_date" field.
func (u *HPFCEventTicketUpsertBulk) ClearPaymentDueDate() *HPFCEventTicketUpsertBulk
ClearPaymentDueDate clears the value of the "payment_due_date" field.
func (u *HPFCEventTicketUpsertBulk) ClearPaymentStartDate() *HPFCEventTicketUpsertBulk
ClearPaymentStartDate clears the value of the "payment_start_date" field.
func (u *HPFCEventTicketUpsertBulk) ClearUpdatedAt() *HPFCEventTicketUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPFCEventTicketUpsertBulk) DoNothing() *HPFCEventTicketUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPFCEventTicketUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPFCEventTicketUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPFCEventTicketUpsertBulk) Ignore() *HPFCEventTicketUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPFCEventTicket.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *HPFCEventTicketUpsertBulk) SetApplicationDueDate(v time.Time) *HPFCEventTicketUpsertBulk
SetApplicationDueDate sets the "application_due_date" field.
func (u *HPFCEventTicketUpsertBulk) SetApplicationID(v string) *HPFCEventTicketUpsertBulk
SetApplicationID sets the "application_id" field.
func (u *HPFCEventTicketUpsertBulk) SetApplicationStartDate(v time.Time) *HPFCEventTicketUpsertBulk
SetApplicationStartDate sets the "application_start_date" field.
func (u *HPFCEventTicketUpsertBulk) SetApplicationTitle(v string) *HPFCEventTicketUpsertBulk
SetApplicationTitle sets the "application_title" field.
func (u *HPFCEventTicketUpsertBulk) SetFcMemberSha256(v string) *HPFCEventTicketUpsertBulk
SetFcMemberSha256 sets the "fc_member_sha256" field.
func (u *HPFCEventTicketUpsertBulk) SetNum(v int) *HPFCEventTicketUpsertBulk
SetNum sets the "num" field.
func (u *HPFCEventTicketUpsertBulk) SetOwnerUserID(v int) *HPFCEventTicketUpsertBulk
SetOwnerUserID sets the "owner_user_id" field.
func (u *HPFCEventTicketUpsertBulk) SetPaymentDueDate(v time.Time) *HPFCEventTicketUpsertBulk
SetPaymentDueDate sets the "payment_due_date" field.
func (u *HPFCEventTicketUpsertBulk) SetPaymentStartDate(v time.Time) *HPFCEventTicketUpsertBulk
SetPaymentStartDate sets the "payment_start_date" field.
func (u *HPFCEventTicketUpsertBulk) SetStatus(v enums.HPEventFCTicketStatus) *HPFCEventTicketUpsertBulk
SetStatus sets the "status" field.
func (u *HPFCEventTicketUpsertBulk) SetUpdatedAt(v time.Time) *HPFCEventTicketUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (u *HPFCEventTicketUpsertBulk) Update(set func(*HPFCEventTicketUpsert)) *HPFCEventTicketUpsertBulk
Update allows overriding fields `UPDATE` values. See the HPFCEventTicketCreateBulk.OnConflict documentation for more info.
func (u *HPFCEventTicketUpsertBulk) UpdateApplicationDueDate() *HPFCEventTicketUpsertBulk
UpdateApplicationDueDate sets the "application_due_date" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertBulk) UpdateApplicationID() *HPFCEventTicketUpsertBulk
UpdateApplicationID sets the "application_id" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertBulk) UpdateApplicationStartDate() *HPFCEventTicketUpsertBulk
UpdateApplicationStartDate sets the "application_start_date" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertBulk) UpdateApplicationTitle() *HPFCEventTicketUpsertBulk
UpdateApplicationTitle sets the "application_title" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertBulk) UpdateFcMemberSha256() *HPFCEventTicketUpsertBulk
UpdateFcMemberSha256 sets the "fc_member_sha256" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertBulk) UpdateNewValues() *HPFCEventTicketUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPFCEventTicket.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPFCEventTicketUpsertBulk) UpdateNum() *HPFCEventTicketUpsertBulk
UpdateNum sets the "num" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertBulk) UpdateOwnerUserID() *HPFCEventTicketUpsertBulk
UpdateOwnerUserID sets the "owner_user_id" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertBulk) UpdatePaymentDueDate() *HPFCEventTicketUpsertBulk
UpdatePaymentDueDate sets the "payment_due_date" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertBulk) UpdatePaymentStartDate() *HPFCEventTicketUpsertBulk
UpdatePaymentStartDate sets the "payment_start_date" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertBulk) UpdateStatus() *HPFCEventTicketUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertBulk) UpdateUpdatedAt() *HPFCEventTicketUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPFCEventTicketUpsertOne is the builder for "upsert"-ing
one HPFCEventTicket node.
type HPFCEventTicketUpsertOne struct {
// contains filtered or unexported fields
}
func (u *HPFCEventTicketUpsertOne) AddNum(v int) *HPFCEventTicketUpsertOne
AddNum adds v to the "num" field.
func (u *HPFCEventTicketUpsertOne) ClearApplicationDueDate() *HPFCEventTicketUpsertOne
ClearApplicationDueDate clears the value of the "application_due_date" field.
func (u *HPFCEventTicketUpsertOne) ClearApplicationID() *HPFCEventTicketUpsertOne
ClearApplicationID clears the value of the "application_id" field.
func (u *HPFCEventTicketUpsertOne) ClearApplicationStartDate() *HPFCEventTicketUpsertOne
ClearApplicationStartDate clears the value of the "application_start_date" field.
func (u *HPFCEventTicketUpsertOne) ClearPaymentDueDate() *HPFCEventTicketUpsertOne
ClearPaymentDueDate clears the value of the "payment_due_date" field.
func (u *HPFCEventTicketUpsertOne) ClearPaymentStartDate() *HPFCEventTicketUpsertOne
ClearPaymentStartDate clears the value of the "payment_start_date" field.
func (u *HPFCEventTicketUpsertOne) ClearUpdatedAt() *HPFCEventTicketUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPFCEventTicketUpsertOne) DoNothing() *HPFCEventTicketUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPFCEventTicketUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPFCEventTicketUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPFCEventTicketUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *HPFCEventTicketUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *HPFCEventTicketUpsertOne) Ignore() *HPFCEventTicketUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPFCEventTicket.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *HPFCEventTicketUpsertOne) SetApplicationDueDate(v time.Time) *HPFCEventTicketUpsertOne
SetApplicationDueDate sets the "application_due_date" field.
func (u *HPFCEventTicketUpsertOne) SetApplicationID(v string) *HPFCEventTicketUpsertOne
SetApplicationID sets the "application_id" field.
func (u *HPFCEventTicketUpsertOne) SetApplicationStartDate(v time.Time) *HPFCEventTicketUpsertOne
SetApplicationStartDate sets the "application_start_date" field.
func (u *HPFCEventTicketUpsertOne) SetApplicationTitle(v string) *HPFCEventTicketUpsertOne
SetApplicationTitle sets the "application_title" field.
func (u *HPFCEventTicketUpsertOne) SetFcMemberSha256(v string) *HPFCEventTicketUpsertOne
SetFcMemberSha256 sets the "fc_member_sha256" field.
func (u *HPFCEventTicketUpsertOne) SetNum(v int) *HPFCEventTicketUpsertOne
SetNum sets the "num" field.
func (u *HPFCEventTicketUpsertOne) SetOwnerUserID(v int) *HPFCEventTicketUpsertOne
SetOwnerUserID sets the "owner_user_id" field.
func (u *HPFCEventTicketUpsertOne) SetPaymentDueDate(v time.Time) *HPFCEventTicketUpsertOne
SetPaymentDueDate sets the "payment_due_date" field.
func (u *HPFCEventTicketUpsertOne) SetPaymentStartDate(v time.Time) *HPFCEventTicketUpsertOne
SetPaymentStartDate sets the "payment_start_date" field.
func (u *HPFCEventTicketUpsertOne) SetStatus(v enums.HPEventFCTicketStatus) *HPFCEventTicketUpsertOne
SetStatus sets the "status" field.
func (u *HPFCEventTicketUpsertOne) SetUpdatedAt(v time.Time) *HPFCEventTicketUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (u *HPFCEventTicketUpsertOne) Update(set func(*HPFCEventTicketUpsert)) *HPFCEventTicketUpsertOne
Update allows overriding fields `UPDATE` values. See the HPFCEventTicketCreate.OnConflict documentation for more info.
func (u *HPFCEventTicketUpsertOne) UpdateApplicationDueDate() *HPFCEventTicketUpsertOne
UpdateApplicationDueDate sets the "application_due_date" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertOne) UpdateApplicationID() *HPFCEventTicketUpsertOne
UpdateApplicationID sets the "application_id" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertOne) UpdateApplicationStartDate() *HPFCEventTicketUpsertOne
UpdateApplicationStartDate sets the "application_start_date" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertOne) UpdateApplicationTitle() *HPFCEventTicketUpsertOne
UpdateApplicationTitle sets the "application_title" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertOne) UpdateFcMemberSha256() *HPFCEventTicketUpsertOne
UpdateFcMemberSha256 sets the "fc_member_sha256" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertOne) UpdateNewValues() *HPFCEventTicketUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPFCEventTicket.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPFCEventTicketUpsertOne) UpdateNum() *HPFCEventTicketUpsertOne
UpdateNum sets the "num" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertOne) UpdateOwnerUserID() *HPFCEventTicketUpsertOne
UpdateOwnerUserID sets the "owner_user_id" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertOne) UpdatePaymentDueDate() *HPFCEventTicketUpsertOne
UpdatePaymentDueDate sets the "payment_due_date" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertOne) UpdatePaymentStartDate() *HPFCEventTicketUpsertOne
UpdatePaymentStartDate sets the "payment_start_date" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertOne) UpdateStatus() *HPFCEventTicketUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
func (u *HPFCEventTicketUpsertOne) UpdateUpdatedAt() *HPFCEventTicketUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPFCEventTickets is a parsable slice of HPFCEventTicket.
type HPFCEventTickets []*HPFCEventTicket
HPFeedItem is the model entity for the HPFeedItem schema.
type HPFeedItem struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// SourceID holds the value of the "source_id" field.
SourceID int `json:"source_id,omitempty"`
// AssetType holds the value of the "asset_type" field.
AssetType enums.HPAssetType `json:"asset_type,omitempty"`
// Title holds the value of the "title" field.
Title string `json:"title,omitempty"`
// PostAt holds the value of the "post_at" field.
PostAt time.Time `json:"post_at,omitempty"`
// SourceURL holds the value of the "source_url" field.
SourceURL string `json:"source_url,omitempty"`
// ImageURL holds the value of the "image_url" field.
ImageURL *string `json:"image_url,omitempty"`
// Media holds the value of the "media" field.
Media []jsonfields.Media `json:"media,omitempty"`
// OwnerArtistID holds the value of the "owner_artist_id" field.
OwnerArtistID *int `json:"owner_artist_id,omitempty"`
// OwnerMemberID holds the value of the "owner_member_id" field.
OwnerMemberID *int `json:"owner_member_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the HPFeedItemQuery when eager-loading is set.
Edges HPFeedItemEdges `json:"edges"`
// contains filtered or unexported fields
}
func (n *HPFeedItem) IsNode()
IsNode implements the Node interface check for GQLGen.
func (hfi *HPFeedItem) NamedTaggedArtists(name string) ([]*HPArtist, error)
NamedTaggedArtists returns the TaggedArtists named value or an error if the edge was not loaded in eager-loading with this name.
func (hfi *HPFeedItem) NamedTaggedMembers(name string) ([]*HPMember, error)
NamedTaggedMembers returns the TaggedMembers named value or an error if the edge was not loaded in eager-loading with this name.
func (hfi *HPFeedItem) NamedViewHistories(name string) ([]*HPViewHistory, error)
NamedViewHistories returns the ViewHistories named value or an error if the edge was not loaded in eager-loading with this name.
func (hfi *HPFeedItem) OwnerArtist(ctx context.Context) (*HPArtist, error)
func (hfi *HPFeedItem) OwnerMember(ctx context.Context) (*HPMember, error)
func (hfi *HPFeedItem) QueryOwnerArtist() *HPArtistQuery
QueryOwnerArtist queries the "owner_artist" edge of the HPFeedItem entity.
func (hfi *HPFeedItem) QueryOwnerMember() *HPMemberQuery
QueryOwnerMember queries the "owner_member" edge of the HPFeedItem entity.
func (hfi *HPFeedItem) QueryTaggedArtists() *HPArtistQuery
QueryTaggedArtists queries the "tagged_artists" edge of the HPFeedItem entity.
func (hfi *HPFeedItem) QueryTaggedMembers() *HPMemberQuery
QueryTaggedMembers queries the "tagged_members" edge of the HPFeedItem entity.
func (hfi *HPFeedItem) QueryViewHistories() *HPViewHistoryQuery
QueryViewHistories queries the "view_histories" edge of the HPFeedItem entity.
func (hfi *HPFeedItem) String() string
String implements the fmt.Stringer.
func (hfi *HPFeedItem) TaggedArtists(ctx context.Context) (result []*HPArtist, err error)
func (hfi *HPFeedItem) TaggedMembers(ctx context.Context) (result []*HPMember, err error)
func (hfi *HPFeedItem) ToEdge(order *HPFeedItemOrder) *HPFeedItemEdge
ToEdge converts HPFeedItem into HPFeedItemEdge.
func (hfi *HPFeedItem) Unwrap() *HPFeedItem
Unwrap unwraps the HPFeedItem entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (hfi *HPFeedItem) Update() *HPFeedItemUpdateOne
Update returns a builder for updating this HPFeedItem. Note that you need to call HPFeedItem.Unwrap() before calling this method if this HPFeedItem was returned from a transaction, and the transaction was committed or rolled back.
func (hfi *HPFeedItem) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the HPFeedItem. This includes values selected through modifiers, order, etc.
HPFeedItemClient is a client for the HPFeedItem schema.
type HPFeedItemClient struct {
// contains filtered or unexported fields
}
func NewHPFeedItemClient(c config) *HPFeedItemClient
NewHPFeedItemClient returns a client for the HPFeedItem from the given config.
func (c *HPFeedItemClient) Create() *HPFeedItemCreate
Create returns a builder for creating a HPFeedItem entity.
func (c *HPFeedItemClient) CreateBulk(builders ...*HPFeedItemCreate) *HPFeedItemCreateBulk
CreateBulk returns a builder for creating a bulk of HPFeedItem entities.
func (c *HPFeedItemClient) Delete() *HPFeedItemDelete
Delete returns a delete builder for HPFeedItem.
func (c *HPFeedItemClient) DeleteOne(hfi *HPFeedItem) *HPFeedItemDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *HPFeedItemClient) DeleteOneID(id int) *HPFeedItemDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *HPFeedItemClient) Get(ctx context.Context, id int) (*HPFeedItem, error)
Get returns a HPFeedItem entity by its id.
func (c *HPFeedItemClient) GetX(ctx context.Context, id int) *HPFeedItem
GetX is like Get, but panics if an error occurs.
func (c *HPFeedItemClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *HPFeedItemClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hpfeeditem.Intercept(f(g(h())))`.
func (c *HPFeedItemClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *HPFeedItemClient) Query() *HPFeedItemQuery
Query returns a query builder for HPFeedItem.
func (c *HPFeedItemClient) QueryOwnerArtist(hfi *HPFeedItem) *HPArtistQuery
QueryOwnerArtist queries the owner_artist edge of a HPFeedItem.
func (c *HPFeedItemClient) QueryOwnerMember(hfi *HPFeedItem) *HPMemberQuery
QueryOwnerMember queries the owner_member edge of a HPFeedItem.
func (c *HPFeedItemClient) QueryTaggedArtists(hfi *HPFeedItem) *HPArtistQuery
QueryTaggedArtists queries the tagged_artists edge of a HPFeedItem.
func (c *HPFeedItemClient) QueryTaggedMembers(hfi *HPFeedItem) *HPMemberQuery
QueryTaggedMembers queries the tagged_members edge of a HPFeedItem.
func (c *HPFeedItemClient) QueryViewHistories(hfi *HPFeedItem) *HPViewHistoryQuery
QueryViewHistories queries the view_histories edge of a HPFeedItem.
func (c *HPFeedItemClient) Update() *HPFeedItemUpdate
Update returns an update builder for HPFeedItem.
func (c *HPFeedItemClient) UpdateOne(hfi *HPFeedItem) *HPFeedItemUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *HPFeedItemClient) UpdateOneID(id int) *HPFeedItemUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *HPFeedItemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hpfeeditem.Hooks(f(g(h())))`.
HPFeedItemConnection is the connection containing edges to HPFeedItem.
type HPFeedItemConnection struct {
Edges []*HPFeedItemEdge `json:"edges"`
PageInfo PageInfo `json:"pageInfo"`
TotalCount int `json:"totalCount"`
}
HPFeedItemCreate is the builder for creating a HPFeedItem entity.
type HPFeedItemCreate struct {
// contains filtered or unexported fields
}
func (hfic *HPFeedItemCreate) AddTaggedArtistIDs(ids ...int) *HPFeedItemCreate
AddTaggedArtistIDs adds the "tagged_artists" edge to the HPArtist entity by IDs.
func (hfic *HPFeedItemCreate) AddTaggedArtists(h ...*HPArtist) *HPFeedItemCreate
AddTaggedArtists adds the "tagged_artists" edges to the HPArtist entity.
func (hfic *HPFeedItemCreate) AddTaggedMemberIDs(ids ...int) *HPFeedItemCreate
AddTaggedMemberIDs adds the "tagged_members" edge to the HPMember entity by IDs.
func (hfic *HPFeedItemCreate) AddTaggedMembers(h ...*HPMember) *HPFeedItemCreate
AddTaggedMembers adds the "tagged_members" edges to the HPMember entity.
func (hfic *HPFeedItemCreate) AddViewHistories(h ...*HPViewHistory) *HPFeedItemCreate
AddViewHistories adds the "view_histories" edges to the HPViewHistory entity.
func (hfic *HPFeedItemCreate) AddViewHistoryIDs(ids ...int) *HPFeedItemCreate
AddViewHistoryIDs adds the "view_histories" edge to the HPViewHistory entity by IDs.
func (hfic *HPFeedItemCreate) Exec(ctx context.Context) error
Exec executes the query.
func (hfic *HPFeedItemCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hfic *HPFeedItemCreate) Mutation() *HPFeedItemMutation
Mutation returns the HPFeedItemMutation object of the builder.
func (hfic *HPFeedItemCreate) OnConflict(opts ...sql.ConflictOption) *HPFeedItemUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPFeedItem.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPFeedItemUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (hfic *HPFeedItemCreate) OnConflictColumns(columns ...string) *HPFeedItemUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPFeedItem.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hfic *HPFeedItemCreate) Save(ctx context.Context) (*HPFeedItem, error)
Save creates the HPFeedItem in the database.
func (hfic *HPFeedItemCreate) SaveX(ctx context.Context) *HPFeedItem
SaveX calls Save and panics if Save returns an error.
func (hfic *HPFeedItemCreate) SetAssetType(eat enums.HPAssetType) *HPFeedItemCreate
SetAssetType sets the "asset_type" field.
func (hfic *HPFeedItemCreate) SetCreatedAt(t time.Time) *HPFeedItemCreate
SetCreatedAt sets the "created_at" field.
func (hfic *HPFeedItemCreate) SetImageURL(s string) *HPFeedItemCreate
SetImageURL sets the "image_url" field.
func (hfic *HPFeedItemCreate) SetMedia(j []jsonfields.Media) *HPFeedItemCreate
SetMedia sets the "media" field.
func (hfic *HPFeedItemCreate) SetNillableAssetType(eat *enums.HPAssetType) *HPFeedItemCreate
SetNillableAssetType sets the "asset_type" field if the given value is not nil.
func (hfic *HPFeedItemCreate) SetNillableCreatedAt(t *time.Time) *HPFeedItemCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (hfic *HPFeedItemCreate) SetNillableImageURL(s *string) *HPFeedItemCreate
SetNillableImageURL sets the "image_url" field if the given value is not nil.
func (hfic *HPFeedItemCreate) SetNillableOwnerArtistID(i *int) *HPFeedItemCreate
SetNillableOwnerArtistID sets the "owner_artist_id" field if the given value is not nil.
func (hfic *HPFeedItemCreate) SetNillableOwnerMemberID(i *int) *HPFeedItemCreate
SetNillableOwnerMemberID sets the "owner_member_id" field if the given value is not nil.
func (hfic *HPFeedItemCreate) SetNillableUpdatedAt(t *time.Time) *HPFeedItemCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hfic *HPFeedItemCreate) SetOwnerArtist(h *HPArtist) *HPFeedItemCreate
SetOwnerArtist sets the "owner_artist" edge to the HPArtist entity.
func (hfic *HPFeedItemCreate) SetOwnerArtistID(i int) *HPFeedItemCreate
SetOwnerArtistID sets the "owner_artist_id" field.
func (hfic *HPFeedItemCreate) SetOwnerMember(h *HPMember) *HPFeedItemCreate
SetOwnerMember sets the "owner_member" edge to the HPMember entity.
func (hfic *HPFeedItemCreate) SetOwnerMemberID(i int) *HPFeedItemCreate
SetOwnerMemberID sets the "owner_member_id" field.
func (hfic *HPFeedItemCreate) SetPostAt(t time.Time) *HPFeedItemCreate
SetPostAt sets the "post_at" field.
func (hfic *HPFeedItemCreate) SetSourceID(i int) *HPFeedItemCreate
SetSourceID sets the "source_id" field.
func (hfic *HPFeedItemCreate) SetSourceURL(s string) *HPFeedItemCreate
SetSourceURL sets the "source_url" field.
func (hfic *HPFeedItemCreate) SetTitle(s string) *HPFeedItemCreate
SetTitle sets the "title" field.
func (hfic *HPFeedItemCreate) SetUpdatedAt(t time.Time) *HPFeedItemCreate
SetUpdatedAt sets the "updated_at" field.
HPFeedItemCreateBulk is the builder for creating many HPFeedItem entities in bulk.
type HPFeedItemCreateBulk struct {
// contains filtered or unexported fields
}
func (hficb *HPFeedItemCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (hficb *HPFeedItemCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hficb *HPFeedItemCreateBulk) OnConflict(opts ...sql.ConflictOption) *HPFeedItemUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPFeedItem.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPFeedItemUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (hficb *HPFeedItemCreateBulk) OnConflictColumns(columns ...string) *HPFeedItemUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPFeedItem.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hficb *HPFeedItemCreateBulk) Save(ctx context.Context) ([]*HPFeedItem, error)
Save creates the HPFeedItem entities in the database.
func (hficb *HPFeedItemCreateBulk) SaveX(ctx context.Context) []*HPFeedItem
SaveX is like Save, but panics if an error occurs.
HPFeedItemDelete is the builder for deleting a HPFeedItem entity.
type HPFeedItemDelete struct {
// contains filtered or unexported fields
}
func (hfid *HPFeedItemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (hfid *HPFeedItemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (hfid *HPFeedItemDelete) Where(ps ...predicate.HPFeedItem) *HPFeedItemDelete
Where appends a list predicates to the HPFeedItemDelete builder.
HPFeedItemDeleteOne is the builder for deleting a single HPFeedItem entity.
type HPFeedItemDeleteOne struct {
// contains filtered or unexported fields
}
func (hfido *HPFeedItemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (hfido *HPFeedItemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hfido *HPFeedItemDeleteOne) Where(ps ...predicate.HPFeedItem) *HPFeedItemDeleteOne
Where appends a list predicates to the HPFeedItemDelete builder.
HPFeedItemEdge is the edge representation of HPFeedItem.
type HPFeedItemEdge struct {
Node *HPFeedItem `json:"node"`
Cursor Cursor `json:"cursor"`
}
HPFeedItemEdges holds the relations/edges for other nodes in the graph.
type HPFeedItemEdges struct {
// ViewHistories holds the value of the view_histories edge.
ViewHistories []*HPViewHistory `json:"view_histories,omitempty"`
// OwnerArtist holds the value of the owner_artist edge.
OwnerArtist *HPArtist `json:"owner_artist,omitempty"`
// OwnerMember holds the value of the owner_member edge.
OwnerMember *HPMember `json:"owner_member,omitempty"`
// TaggedArtists holds the value of the tagged_artists edge.
TaggedArtists []*HPArtist `json:"tagged_artists,omitempty"`
// TaggedMembers holds the value of the tagged_members edge.
TaggedMembers []*HPMember `json:"tagged_members,omitempty"`
// contains filtered or unexported fields
}
func (e HPFeedItemEdges) OwnerArtistOrErr() (*HPArtist, error)
OwnerArtistOrErr returns the OwnerArtist value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (e HPFeedItemEdges) OwnerMemberOrErr() (*HPMember, error)
OwnerMemberOrErr returns the OwnerMember value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (e HPFeedItemEdges) TaggedArtistsOrErr() ([]*HPArtist, error)
TaggedArtistsOrErr returns the TaggedArtists value or an error if the edge was not loaded in eager-loading.
func (e HPFeedItemEdges) TaggedMembersOrErr() ([]*HPMember, error)
TaggedMembersOrErr returns the TaggedMembers value or an error if the edge was not loaded in eager-loading.
func (e HPFeedItemEdges) ViewHistoriesOrErr() ([]*HPViewHistory, error)
ViewHistoriesOrErr returns the ViewHistories value or an error if the edge was not loaded in eager-loading.
HPFeedItemFilter provides a generic filtering capability at runtime for HPFeedItemQuery.
type HPFeedItemFilter struct {
// contains filtered or unexported fields
}
func (f *HPFeedItemFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *HPFeedItemFilter) WhereAssetType(p entql.StringP)
WhereAssetType applies the entql string predicate on the asset_type field.
func (f *HPFeedItemFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (f *HPFeedItemFilter) WhereHasOwnerArtist()
WhereHasOwnerArtist applies a predicate to check if query has an edge owner_artist.
func (f *HPFeedItemFilter) WhereHasOwnerArtistWith(preds ...predicate.HPArtist)
WhereHasOwnerArtistWith applies a predicate to check if query has an edge owner_artist with a given conditions (other predicates).
func (f *HPFeedItemFilter) WhereHasOwnerMember()
WhereHasOwnerMember applies a predicate to check if query has an edge owner_member.
func (f *HPFeedItemFilter) WhereHasOwnerMemberWith(preds ...predicate.HPMember)
WhereHasOwnerMemberWith applies a predicate to check if query has an edge owner_member with a given conditions (other predicates).
func (f *HPFeedItemFilter) WhereHasTaggedArtists()
WhereHasTaggedArtists applies a predicate to check if query has an edge tagged_artists.
func (f *HPFeedItemFilter) WhereHasTaggedArtistsWith(preds ...predicate.HPArtist)
WhereHasTaggedArtistsWith applies a predicate to check if query has an edge tagged_artists with a given conditions (other predicates).
func (f *HPFeedItemFilter) WhereHasTaggedMembers()
WhereHasTaggedMembers applies a predicate to check if query has an edge tagged_members.
func (f *HPFeedItemFilter) WhereHasTaggedMembersWith(preds ...predicate.HPMember)
WhereHasTaggedMembersWith applies a predicate to check if query has an edge tagged_members with a given conditions (other predicates).
func (f *HPFeedItemFilter) WhereHasViewHistories()
WhereHasViewHistories applies a predicate to check if query has an edge view_histories.
func (f *HPFeedItemFilter) WhereHasViewHistoriesWith(preds ...predicate.HPViewHistory)
WhereHasViewHistoriesWith applies a predicate to check if query has an edge view_histories with a given conditions (other predicates).
func (f *HPFeedItemFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *HPFeedItemFilter) WhereImageURL(p entql.StringP)
WhereImageURL applies the entql string predicate on the image_url field.
func (f *HPFeedItemFilter) WhereMedia(p entql.BytesP)
WhereMedia applies the entql json.RawMessage predicate on the media field.
func (f *HPFeedItemFilter) WhereOwnerArtistID(p entql.IntP)
WhereOwnerArtistID applies the entql int predicate on the owner_artist_id field.
func (f *HPFeedItemFilter) WhereOwnerMemberID(p entql.IntP)
WhereOwnerMemberID applies the entql int predicate on the owner_member_id field.
func (f *HPFeedItemFilter) WherePostAt(p entql.TimeP)
WherePostAt applies the entql time.Time predicate on the post_at field.
func (f *HPFeedItemFilter) WhereSourceID(p entql.IntP)
WhereSourceID applies the entql int predicate on the source_id field.
func (f *HPFeedItemFilter) WhereSourceURL(p entql.StringP)
WhereSourceURL applies the entql string predicate on the source_url field.
func (f *HPFeedItemFilter) WhereTitle(p entql.StringP)
WhereTitle applies the entql string predicate on the title field.
func (f *HPFeedItemFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
HPFeedItemGroupBy is the group-by builder for HPFeedItem entities.
type HPFeedItemGroupBy struct {
// contains filtered or unexported fields
}
func (hfigb *HPFeedItemGroupBy) Aggregate(fns ...AggregateFunc) *HPFeedItemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *HPFeedItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPFeedItemGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPFeedItemGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPFeedItemGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPFeedItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPFeedItemGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPFeedItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPFeedItemGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPFeedItemGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPFeedItemGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPFeedItemGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPFeedItemGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hfigb *HPFeedItemGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPFeedItemGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPFeedItemGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPFeedItemGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPFeedItemGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPFeedItemGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPFeedItemMutation represents an operation that mutates the HPFeedItem nodes in the graph.
type HPFeedItemMutation struct {
// contains filtered or unexported fields
}
func (m *HPFeedItemMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPFeedItemMutation) AddSourceID(i int)
AddSourceID adds i to the "source_id" field.
func (m *HPFeedItemMutation) AddTaggedArtistIDs(ids ...int)
AddTaggedArtistIDs adds the "tagged_artists" edge to the HPArtist entity by ids.
func (m *HPFeedItemMutation) AddTaggedMemberIDs(ids ...int)
AddTaggedMemberIDs adds the "tagged_members" edge to the HPMember entity by ids.
func (m *HPFeedItemMutation) AddViewHistoryIDs(ids ...int)
AddViewHistoryIDs adds the "view_histories" edge to the HPViewHistory entity by ids.
func (m *HPFeedItemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *HPFeedItemMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPFeedItemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *HPFeedItemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *HPFeedItemMutation) AddedSourceID() (r int, exists bool)
AddedSourceID returns the value that was added to the "source_id" field in this mutation.
func (m *HPFeedItemMutation) AppendMedia(j []jsonfields.Media)
AppendMedia adds j to the "media" field.
func (m *HPFeedItemMutation) AppendedMedia() ([]jsonfields.Media, bool)
AppendedMedia returns the list of values that were appended to the "media" field in this mutation.
func (m *HPFeedItemMutation) AssetType() (r enums.HPAssetType, exists bool)
AssetType returns the value of the "asset_type" field in the mutation.
func (m *HPFeedItemMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (m *HPFeedItemMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *HPFeedItemMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPFeedItemMutation) ClearImageURL()
ClearImageURL clears the value of the "image_url" field.
func (m *HPFeedItemMutation) ClearOwnerArtist()
ClearOwnerArtist clears the "owner_artist" edge to the HPArtist entity.
func (m *HPFeedItemMutation) ClearOwnerArtistID()
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (m *HPFeedItemMutation) ClearOwnerMember()
ClearOwnerMember clears the "owner_member" edge to the HPMember entity.
func (m *HPFeedItemMutation) ClearOwnerMemberID()
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (m *HPFeedItemMutation) ClearTaggedArtists()
ClearTaggedArtists clears the "tagged_artists" edge to the HPArtist entity.
func (m *HPFeedItemMutation) ClearTaggedMembers()
ClearTaggedMembers clears the "tagged_members" edge to the HPMember entity.
func (m *HPFeedItemMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (m *HPFeedItemMutation) ClearViewHistories()
ClearViewHistories clears the "view_histories" edge to the HPViewHistory entity.
func (m *HPFeedItemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *HPFeedItemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m HPFeedItemMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *HPFeedItemMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (m *HPFeedItemMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (m *HPFeedItemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *HPFeedItemMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPFeedItemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *HPFeedItemMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *HPFeedItemMutation) Filter() *HPFeedItemFilter
Filter returns an entql.Where implementation to apply filters on the HPFeedItemMutation builder.
func (m *HPFeedItemMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *HPFeedItemMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *HPFeedItemMutation) ImageURL() (r string, exists bool)
ImageURL returns the value of the "image_url" field in the mutation.
func (m *HPFeedItemMutation) ImageURLCleared() bool
ImageURLCleared returns if the "image_url" field was cleared in this mutation.
func (m *HPFeedItemMutation) Media() (r []jsonfields.Media, exists bool)
Media returns the value of the "media" field in the mutation.
func (m *HPFeedItemMutation) OldAssetType(ctx context.Context) (v enums.HPAssetType, err error)
OldAssetType returns the old "asset_type" field's value of the HPFeedItem entity. If the HPFeedItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFeedItemMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
OldCreatedAt returns the old "created_at" field's value of the HPFeedItem entity. If the HPFeedItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFeedItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *HPFeedItemMutation) OldImageURL(ctx context.Context) (v *string, err error)
OldImageURL returns the old "image_url" field's value of the HPFeedItem entity. If the HPFeedItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFeedItemMutation) OldMedia(ctx context.Context) (v []jsonfields.Media, err error)
OldMedia returns the old "media" field's value of the HPFeedItem entity. If the HPFeedItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFeedItemMutation) OldOwnerArtistID(ctx context.Context) (v *int, err error)
OldOwnerArtistID returns the old "owner_artist_id" field's value of the HPFeedItem entity. If the HPFeedItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFeedItemMutation) OldOwnerMemberID(ctx context.Context) (v *int, err error)
OldOwnerMemberID returns the old "owner_member_id" field's value of the HPFeedItem entity. If the HPFeedItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFeedItemMutation) OldPostAt(ctx context.Context) (v time.Time, err error)
OldPostAt returns the old "post_at" field's value of the HPFeedItem entity. If the HPFeedItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFeedItemMutation) OldSourceID(ctx context.Context) (v int, err error)
OldSourceID returns the old "source_id" field's value of the HPFeedItem entity. If the HPFeedItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFeedItemMutation) OldSourceURL(ctx context.Context) (v string, err error)
OldSourceURL returns the old "source_url" field's value of the HPFeedItem entity. If the HPFeedItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFeedItemMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the HPFeedItem entity. If the HPFeedItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFeedItemMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
OldUpdatedAt returns the old "updated_at" field's value of the HPFeedItem entity. If the HPFeedItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFeedItemMutation) Op() Op
Op returns the operation name.
func (m *HPFeedItemMutation) OwnerArtistCleared() bool
OwnerArtistCleared reports if the "owner_artist" edge to the HPArtist entity was cleared.
func (m *HPFeedItemMutation) OwnerArtistID() (r int, exists bool)
OwnerArtistID returns the value of the "owner_artist_id" field in the mutation.
func (m *HPFeedItemMutation) OwnerArtistIDCleared() bool
OwnerArtistIDCleared returns if the "owner_artist_id" field was cleared in this mutation.
func (m *HPFeedItemMutation) OwnerArtistIDs() (ids []int)
OwnerArtistIDs returns the "owner_artist" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerArtistID instead. It exists only for internal usage by the builders.
func (m *HPFeedItemMutation) OwnerMemberCleared() bool
OwnerMemberCleared reports if the "owner_member" edge to the HPMember entity was cleared.
func (m *HPFeedItemMutation) OwnerMemberID() (r int, exists bool)
OwnerMemberID returns the value of the "owner_member_id" field in the mutation.
func (m *HPFeedItemMutation) OwnerMemberIDCleared() bool
OwnerMemberIDCleared returns if the "owner_member_id" field was cleared in this mutation.
func (m *HPFeedItemMutation) OwnerMemberIDs() (ids []int)
OwnerMemberIDs returns the "owner_member" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerMemberID instead. It exists only for internal usage by the builders.
func (m *HPFeedItemMutation) PostAt() (r time.Time, exists bool)
PostAt returns the value of the "post_at" field in the mutation.
func (m *HPFeedItemMutation) RemoveTaggedArtistIDs(ids ...int)
RemoveTaggedArtistIDs removes the "tagged_artists" edge to the HPArtist entity by IDs.
func (m *HPFeedItemMutation) RemoveTaggedMemberIDs(ids ...int)
RemoveTaggedMemberIDs removes the "tagged_members" edge to the HPMember entity by IDs.
func (m *HPFeedItemMutation) RemoveViewHistoryIDs(ids ...int)
RemoveViewHistoryIDs removes the "view_histories" edge to the HPViewHistory entity by IDs.
func (m *HPFeedItemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *HPFeedItemMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *HPFeedItemMutation) RemovedTaggedArtistsIDs() (ids []int)
RemovedTaggedArtists returns the removed IDs of the "tagged_artists" edge to the HPArtist entity.
func (m *HPFeedItemMutation) RemovedTaggedMembersIDs() (ids []int)
RemovedTaggedMembers returns the removed IDs of the "tagged_members" edge to the HPMember entity.
func (m *HPFeedItemMutation) RemovedViewHistoriesIDs() (ids []int)
RemovedViewHistories returns the removed IDs of the "view_histories" edge to the HPViewHistory entity.
func (m *HPFeedItemMutation) ResetAssetType()
ResetAssetType resets all changes to the "asset_type" field.
func (m *HPFeedItemMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (m *HPFeedItemMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *HPFeedItemMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPFeedItemMutation) ResetImageURL()
ResetImageURL resets all changes to the "image_url" field.
func (m *HPFeedItemMutation) ResetMedia()
ResetMedia resets all changes to the "media" field.
func (m *HPFeedItemMutation) ResetOwnerArtist()
ResetOwnerArtist resets all changes to the "owner_artist" edge.
func (m *HPFeedItemMutation) ResetOwnerArtistID()
ResetOwnerArtistID resets all changes to the "owner_artist_id" field.
func (m *HPFeedItemMutation) ResetOwnerMember()
ResetOwnerMember resets all changes to the "owner_member" edge.
func (m *HPFeedItemMutation) ResetOwnerMemberID()
ResetOwnerMemberID resets all changes to the "owner_member_id" field.
func (m *HPFeedItemMutation) ResetPostAt()
ResetPostAt resets all changes to the "post_at" field.
func (m *HPFeedItemMutation) ResetSourceID()
ResetSourceID resets all changes to the "source_id" field.
func (m *HPFeedItemMutation) ResetSourceURL()
ResetSourceURL resets all changes to the "source_url" field.
func (m *HPFeedItemMutation) ResetTaggedArtists()
ResetTaggedArtists resets all changes to the "tagged_artists" edge.
func (m *HPFeedItemMutation) ResetTaggedMembers()
ResetTaggedMembers resets all changes to the "tagged_members" edge.
func (m *HPFeedItemMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (m *HPFeedItemMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (m *HPFeedItemMutation) ResetViewHistories()
ResetViewHistories resets all changes to the "view_histories" edge.
func (m *HPFeedItemMutation) SetAssetType(eat enums.HPAssetType)
SetAssetType sets the "asset_type" field.
func (m *HPFeedItemMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (m *HPFeedItemMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPFeedItemMutation) SetImageURL(s string)
SetImageURL sets the "image_url" field.
func (m *HPFeedItemMutation) SetMedia(j []jsonfields.Media)
SetMedia sets the "media" field.
func (m *HPFeedItemMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *HPFeedItemMutation) SetOwnerArtistID(i int)
SetOwnerArtistID sets the "owner_artist_id" field.
func (m *HPFeedItemMutation) SetOwnerMemberID(i int)
SetOwnerMemberID sets the "owner_member_id" field.
func (m *HPFeedItemMutation) SetPostAt(t time.Time)
SetPostAt sets the "post_at" field.
func (m *HPFeedItemMutation) SetSourceID(i int)
SetSourceID sets the "source_id" field.
func (m *HPFeedItemMutation) SetSourceURL(s string)
SetSourceURL sets the "source_url" field.
func (m *HPFeedItemMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (m *HPFeedItemMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (m *HPFeedItemMutation) SourceID() (r int, exists bool)
SourceID returns the value of the "source_id" field in the mutation.
func (m *HPFeedItemMutation) SourceURL() (r string, exists bool)
SourceURL returns the value of the "source_url" field in the mutation.
func (m *HPFeedItemMutation) TaggedArtistsCleared() bool
TaggedArtistsCleared reports if the "tagged_artists" edge to the HPArtist entity was cleared.
func (m *HPFeedItemMutation) TaggedArtistsIDs() (ids []int)
TaggedArtistsIDs returns the "tagged_artists" edge IDs in the mutation.
func (m *HPFeedItemMutation) TaggedMembersCleared() bool
TaggedMembersCleared reports if the "tagged_members" edge to the HPMember entity was cleared.
func (m *HPFeedItemMutation) TaggedMembersIDs() (ids []int)
TaggedMembersIDs returns the "tagged_members" edge IDs in the mutation.
func (m *HPFeedItemMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (m HPFeedItemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *HPFeedItemMutation) Type() string
Type returns the node type of this mutation (HPFeedItem).
func (m *HPFeedItemMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (m *HPFeedItemMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (m *HPFeedItemMutation) ViewHistoriesCleared() bool
ViewHistoriesCleared reports if the "view_histories" edge to the HPViewHistory entity was cleared.
func (m *HPFeedItemMutation) ViewHistoriesIDs() (ids []int)
ViewHistoriesIDs returns the "view_histories" edge IDs in the mutation.
func (m *HPFeedItemMutation) Where(ps ...predicate.HPFeedItem)
Where appends a list predicates to the HPFeedItemMutation builder.
func (m *HPFeedItemMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HPFeedItemMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
HPFeedItemOrder defines the ordering of HPFeedItem.
type HPFeedItemOrder struct {
Direction OrderDirection `json:"direction"`
Field *HPFeedItemOrderField `json:"field"`
}
HPFeedItemOrderField defines the ordering field of HPFeedItem.
type HPFeedItemOrderField struct {
// contains filtered or unexported fields
}
func (f HPFeedItemOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (f HPFeedItemOrderField) String() string
String implement fmt.Stringer interface.
func (f *HPFeedItemOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
HPFeedItemPaginateOption enables pagination customization.
type HPFeedItemPaginateOption func(*hpfeeditemPager) error
func WithHPFeedItemFilter(filter func(*HPFeedItemQuery) (*HPFeedItemQuery, error)) HPFeedItemPaginateOption
WithHPFeedItemFilter configures pagination filter.
func WithHPFeedItemOrder(order *HPFeedItemOrder) HPFeedItemPaginateOption
WithHPFeedItemOrder configures pagination ordering.
HPFeedItemQuery is the builder for querying HPFeedItem entities.
type HPFeedItemQuery struct {
// contains filtered or unexported fields
}
func (hfiq *HPFeedItemQuery) Aggregate(fns ...AggregateFunc) *HPFeedItemSelect
Aggregate returns a HPFeedItemSelect configured with the given aggregations.
func (hfiq *HPFeedItemQuery) All(ctx context.Context) ([]*HPFeedItem, error)
All executes the query and returns a list of HPFeedItems.
func (hfiq *HPFeedItemQuery) AllX(ctx context.Context) []*HPFeedItem
AllX is like All, but panics if an error occurs.
func (hfiq *HPFeedItemQuery) Clone() *HPFeedItemQuery
Clone returns a duplicate of the HPFeedItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (hfi *HPFeedItemQuery) CollectFields(ctx context.Context, satisfies ...string) (*HPFeedItemQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (hfiq *HPFeedItemQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (hfiq *HPFeedItemQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (hfiq *HPFeedItemQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (hfiq *HPFeedItemQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (hfiq *HPFeedItemQuery) Filter() *HPFeedItemFilter
Filter returns a Filter implementation to apply filters on the HPFeedItemQuery builder.
func (hfiq *HPFeedItemQuery) First(ctx context.Context) (*HPFeedItem, error)
First returns the first HPFeedItem entity from the query. Returns a *NotFoundError when no HPFeedItem was found.
func (hfiq *HPFeedItemQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first HPFeedItem ID from the query. Returns a *NotFoundError when no HPFeedItem ID was found.
func (hfiq *HPFeedItemQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (hfiq *HPFeedItemQuery) FirstX(ctx context.Context) *HPFeedItem
FirstX is like First, but panics if an error occurs.
func (hfiq *HPFeedItemQuery) GroupBy(field string, fields ...string) *HPFeedItemGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.HPFeedItem.Query().
GroupBy(hpfeeditem.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (hfiq *HPFeedItemQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of HPFeedItem IDs.
func (hfiq *HPFeedItemQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (hfiq *HPFeedItemQuery) Limit(limit int) *HPFeedItemQuery
Limit the number of records to be returned by this query.
func (hfiq *HPFeedItemQuery) Offset(offset int) *HPFeedItemQuery
Offset to start from.
func (hfiq *HPFeedItemQuery) Only(ctx context.Context) (*HPFeedItem, error)
Only returns a single HPFeedItem entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HPFeedItem entity is found. Returns a *NotFoundError when no HPFeedItem entities are found.
func (hfiq *HPFeedItemQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only HPFeedItem ID in the query. Returns a *NotSingularError when more than one HPFeedItem ID is found. Returns a *NotFoundError when no entities are found.
func (hfiq *HPFeedItemQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (hfiq *HPFeedItemQuery) OnlyX(ctx context.Context) *HPFeedItem
OnlyX is like Only, but panics if an error occurs.
func (hfiq *HPFeedItemQuery) Order(o ...hpfeeditem.Order) *HPFeedItemQuery
Order specifies how the records should be ordered.
func (hfi *HPFeedItemQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...HPFeedItemPaginateOption, ) (*HPFeedItemConnection, error)
Paginate executes the query and returns a relay based cursor connection to HPFeedItem.
func (hfiq *HPFeedItemQuery) QueryOwnerArtist() *HPArtistQuery
QueryOwnerArtist chains the current query on the "owner_artist" edge.
func (hfiq *HPFeedItemQuery) QueryOwnerMember() *HPMemberQuery
QueryOwnerMember chains the current query on the "owner_member" edge.
func (hfiq *HPFeedItemQuery) QueryTaggedArtists() *HPArtistQuery
QueryTaggedArtists chains the current query on the "tagged_artists" edge.
func (hfiq *HPFeedItemQuery) QueryTaggedMembers() *HPMemberQuery
QueryTaggedMembers chains the current query on the "tagged_members" edge.
func (hfiq *HPFeedItemQuery) QueryViewHistories() *HPViewHistoryQuery
QueryViewHistories chains the current query on the "view_histories" edge.
func (hfiq *HPFeedItemQuery) Select(fields ...string) *HPFeedItemSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.HPFeedItem.Query().
Select(hpfeeditem.FieldCreatedAt).
Scan(ctx, &v)
func (hfiq *HPFeedItemQuery) Unique(unique bool) *HPFeedItemQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (hfiq *HPFeedItemQuery) Where(ps ...predicate.HPFeedItem) *HPFeedItemQuery
Where adds a new predicate for the HPFeedItemQuery builder.
func (hfiq *HPFeedItemQuery) WithNamedTaggedArtists(name string, opts ...func(*HPArtistQuery)) *HPFeedItemQuery
WithNamedTaggedArtists tells the query-builder to eager-load the nodes that are connected to the "tagged_artists" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hfiq *HPFeedItemQuery) WithNamedTaggedMembers(name string, opts ...func(*HPMemberQuery)) *HPFeedItemQuery
WithNamedTaggedMembers tells the query-builder to eager-load the nodes that are connected to the "tagged_members" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hfiq *HPFeedItemQuery) WithNamedViewHistories(name string, opts ...func(*HPViewHistoryQuery)) *HPFeedItemQuery
WithNamedViewHistories tells the query-builder to eager-load the nodes that are connected to the "view_histories" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hfiq *HPFeedItemQuery) WithOwnerArtist(opts ...func(*HPArtistQuery)) *HPFeedItemQuery
WithOwnerArtist tells the query-builder to eager-load the nodes that are connected to the "owner_artist" edge. The optional arguments are used to configure the query builder of the edge.
func (hfiq *HPFeedItemQuery) WithOwnerMember(opts ...func(*HPMemberQuery)) *HPFeedItemQuery
WithOwnerMember tells the query-builder to eager-load the nodes that are connected to the "owner_member" edge. The optional arguments are used to configure the query builder of the edge.
func (hfiq *HPFeedItemQuery) WithTaggedArtists(opts ...func(*HPArtistQuery)) *HPFeedItemQuery
WithTaggedArtists tells the query-builder to eager-load the nodes that are connected to the "tagged_artists" edge. The optional arguments are used to configure the query builder of the edge.
func (hfiq *HPFeedItemQuery) WithTaggedMembers(opts ...func(*HPMemberQuery)) *HPFeedItemQuery
WithTaggedMembers tells the query-builder to eager-load the nodes that are connected to the "tagged_members" edge. The optional arguments are used to configure the query builder of the edge.
func (hfiq *HPFeedItemQuery) WithViewHistories(opts ...func(*HPViewHistoryQuery)) *HPFeedItemQuery
WithViewHistories tells the query-builder to eager-load the nodes that are connected to the "view_histories" edge. The optional arguments are used to configure the query builder of the edge.
HPFeedItemSelect is the builder for selecting fields of HPFeedItem entities.
type HPFeedItemSelect struct {
*HPFeedItemQuery
// contains filtered or unexported fields
}
func (hfis *HPFeedItemSelect) Aggregate(fns ...AggregateFunc) *HPFeedItemSelect
Aggregate adds the given aggregation functions to the selector query.
func (s *HPFeedItemSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPFeedItemSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPFeedItemSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPFeedItemSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPFeedItemSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPFeedItemSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPFeedItemSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPFeedItemSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPFeedItemSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPFeedItemSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPFeedItemSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPFeedItemSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hfis *HPFeedItemSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPFeedItemSelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPFeedItemSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPFeedItemSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPFeedItemSelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPFeedItemSelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPFeedItemUpdate is the builder for updating HPFeedItem entities.
type HPFeedItemUpdate struct {
// contains filtered or unexported fields
}
func (hfiu *HPFeedItemUpdate) AddSourceID(i int) *HPFeedItemUpdate
AddSourceID adds i to the "source_id" field.
func (hfiu *HPFeedItemUpdate) AddTaggedArtistIDs(ids ...int) *HPFeedItemUpdate
AddTaggedArtistIDs adds the "tagged_artists" edge to the HPArtist entity by IDs.
func (hfiu *HPFeedItemUpdate) AddTaggedArtists(h ...*HPArtist) *HPFeedItemUpdate
AddTaggedArtists adds the "tagged_artists" edges to the HPArtist entity.
func (hfiu *HPFeedItemUpdate) AddTaggedMemberIDs(ids ...int) *HPFeedItemUpdate
AddTaggedMemberIDs adds the "tagged_members" edge to the HPMember entity by IDs.
func (hfiu *HPFeedItemUpdate) AddTaggedMembers(h ...*HPMember) *HPFeedItemUpdate
AddTaggedMembers adds the "tagged_members" edges to the HPMember entity.
func (hfiu *HPFeedItemUpdate) AddViewHistories(h ...*HPViewHistory) *HPFeedItemUpdate
AddViewHistories adds the "view_histories" edges to the HPViewHistory entity.
func (hfiu *HPFeedItemUpdate) AddViewHistoryIDs(ids ...int) *HPFeedItemUpdate
AddViewHistoryIDs adds the "view_histories" edge to the HPViewHistory entity by IDs.
func (hfiu *HPFeedItemUpdate) AppendMedia(j []jsonfields.Media) *HPFeedItemUpdate
AppendMedia appends j to the "media" field.
func (hfiu *HPFeedItemUpdate) ClearImageURL() *HPFeedItemUpdate
ClearImageURL clears the value of the "image_url" field.
func (hfiu *HPFeedItemUpdate) ClearOwnerArtist() *HPFeedItemUpdate
ClearOwnerArtist clears the "owner_artist" edge to the HPArtist entity.
func (hfiu *HPFeedItemUpdate) ClearOwnerArtistID() *HPFeedItemUpdate
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (hfiu *HPFeedItemUpdate) ClearOwnerMember() *HPFeedItemUpdate
ClearOwnerMember clears the "owner_member" edge to the HPMember entity.
func (hfiu *HPFeedItemUpdate) ClearOwnerMemberID() *HPFeedItemUpdate
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (hfiu *HPFeedItemUpdate) ClearTaggedArtists() *HPFeedItemUpdate
ClearTaggedArtists clears all "tagged_artists" edges to the HPArtist entity.
func (hfiu *HPFeedItemUpdate) ClearTaggedMembers() *HPFeedItemUpdate
ClearTaggedMembers clears all "tagged_members" edges to the HPMember entity.
func (hfiu *HPFeedItemUpdate) ClearUpdatedAt() *HPFeedItemUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (hfiu *HPFeedItemUpdate) ClearViewHistories() *HPFeedItemUpdate
ClearViewHistories clears all "view_histories" edges to the HPViewHistory entity.
func (hfiu *HPFeedItemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (hfiu *HPFeedItemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hfiu *HPFeedItemUpdate) Mutation() *HPFeedItemMutation
Mutation returns the HPFeedItemMutation object of the builder.
func (hfiu *HPFeedItemUpdate) RemoveTaggedArtistIDs(ids ...int) *HPFeedItemUpdate
RemoveTaggedArtistIDs removes the "tagged_artists" edge to HPArtist entities by IDs.
func (hfiu *HPFeedItemUpdate) RemoveTaggedArtists(h ...*HPArtist) *HPFeedItemUpdate
RemoveTaggedArtists removes "tagged_artists" edges to HPArtist entities.
func (hfiu *HPFeedItemUpdate) RemoveTaggedMemberIDs(ids ...int) *HPFeedItemUpdate
RemoveTaggedMemberIDs removes the "tagged_members" edge to HPMember entities by IDs.
func (hfiu *HPFeedItemUpdate) RemoveTaggedMembers(h ...*HPMember) *HPFeedItemUpdate
RemoveTaggedMembers removes "tagged_members" edges to HPMember entities.
func (hfiu *HPFeedItemUpdate) RemoveViewHistories(h ...*HPViewHistory) *HPFeedItemUpdate
RemoveViewHistories removes "view_histories" edges to HPViewHistory entities.
func (hfiu *HPFeedItemUpdate) RemoveViewHistoryIDs(ids ...int) *HPFeedItemUpdate
RemoveViewHistoryIDs removes the "view_histories" edge to HPViewHistory entities by IDs.
func (hfiu *HPFeedItemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (hfiu *HPFeedItemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (hfiu *HPFeedItemUpdate) SetAssetType(eat enums.HPAssetType) *HPFeedItemUpdate
SetAssetType sets the "asset_type" field.
func (hfiu *HPFeedItemUpdate) SetImageURL(s string) *HPFeedItemUpdate
SetImageURL sets the "image_url" field.
func (hfiu *HPFeedItemUpdate) SetMedia(j []jsonfields.Media) *HPFeedItemUpdate
SetMedia sets the "media" field.
func (hfiu *HPFeedItemUpdate) SetNillableAssetType(eat *enums.HPAssetType) *HPFeedItemUpdate
SetNillableAssetType sets the "asset_type" field if the given value is not nil.
func (hfiu *HPFeedItemUpdate) SetNillableImageURL(s *string) *HPFeedItemUpdate
SetNillableImageURL sets the "image_url" field if the given value is not nil.
func (hfiu *HPFeedItemUpdate) SetNillableOwnerArtistID(i *int) *HPFeedItemUpdate
SetNillableOwnerArtistID sets the "owner_artist_id" field if the given value is not nil.
func (hfiu *HPFeedItemUpdate) SetNillableOwnerMemberID(i *int) *HPFeedItemUpdate
SetNillableOwnerMemberID sets the "owner_member_id" field if the given value is not nil.
func (hfiu *HPFeedItemUpdate) SetNillableUpdatedAt(t *time.Time) *HPFeedItemUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hfiu *HPFeedItemUpdate) SetOwnerArtist(h *HPArtist) *HPFeedItemUpdate
SetOwnerArtist sets the "owner_artist" edge to the HPArtist entity.
func (hfiu *HPFeedItemUpdate) SetOwnerArtistID(i int) *HPFeedItemUpdate
SetOwnerArtistID sets the "owner_artist_id" field.
func (hfiu *HPFeedItemUpdate) SetOwnerMember(h *HPMember) *HPFeedItemUpdate
SetOwnerMember sets the "owner_member" edge to the HPMember entity.
func (hfiu *HPFeedItemUpdate) SetOwnerMemberID(i int) *HPFeedItemUpdate
SetOwnerMemberID sets the "owner_member_id" field.
func (hfiu *HPFeedItemUpdate) SetPostAt(t time.Time) *HPFeedItemUpdate
SetPostAt sets the "post_at" field.
func (hfiu *HPFeedItemUpdate) SetSourceID(i int) *HPFeedItemUpdate
SetSourceID sets the "source_id" field.
func (hfiu *HPFeedItemUpdate) SetSourceURL(s string) *HPFeedItemUpdate
SetSourceURL sets the "source_url" field.
func (hfiu *HPFeedItemUpdate) SetTitle(s string) *HPFeedItemUpdate
SetTitle sets the "title" field.
func (hfiu *HPFeedItemUpdate) SetUpdatedAt(t time.Time) *HPFeedItemUpdate
SetUpdatedAt sets the "updated_at" field.
func (hfiu *HPFeedItemUpdate) Where(ps ...predicate.HPFeedItem) *HPFeedItemUpdate
Where appends a list predicates to the HPFeedItemUpdate builder.
HPFeedItemUpdateOne is the builder for updating a single HPFeedItem entity.
type HPFeedItemUpdateOne struct {
// contains filtered or unexported fields
}
func (hfiuo *HPFeedItemUpdateOne) AddSourceID(i int) *HPFeedItemUpdateOne
AddSourceID adds i to the "source_id" field.
func (hfiuo *HPFeedItemUpdateOne) AddTaggedArtistIDs(ids ...int) *HPFeedItemUpdateOne
AddTaggedArtistIDs adds the "tagged_artists" edge to the HPArtist entity by IDs.
func (hfiuo *HPFeedItemUpdateOne) AddTaggedArtists(h ...*HPArtist) *HPFeedItemUpdateOne
AddTaggedArtists adds the "tagged_artists" edges to the HPArtist entity.
func (hfiuo *HPFeedItemUpdateOne) AddTaggedMemberIDs(ids ...int) *HPFeedItemUpdateOne
AddTaggedMemberIDs adds the "tagged_members" edge to the HPMember entity by IDs.
func (hfiuo *HPFeedItemUpdateOne) AddTaggedMembers(h ...*HPMember) *HPFeedItemUpdateOne
AddTaggedMembers adds the "tagged_members" edges to the HPMember entity.
func (hfiuo *HPFeedItemUpdateOne) AddViewHistories(h ...*HPViewHistory) *HPFeedItemUpdateOne
AddViewHistories adds the "view_histories" edges to the HPViewHistory entity.
func (hfiuo *HPFeedItemUpdateOne) AddViewHistoryIDs(ids ...int) *HPFeedItemUpdateOne
AddViewHistoryIDs adds the "view_histories" edge to the HPViewHistory entity by IDs.
func (hfiuo *HPFeedItemUpdateOne) AppendMedia(j []jsonfields.Media) *HPFeedItemUpdateOne
AppendMedia appends j to the "media" field.
func (hfiuo *HPFeedItemUpdateOne) ClearImageURL() *HPFeedItemUpdateOne
ClearImageURL clears the value of the "image_url" field.
func (hfiuo *HPFeedItemUpdateOne) ClearOwnerArtist() *HPFeedItemUpdateOne
ClearOwnerArtist clears the "owner_artist" edge to the HPArtist entity.
func (hfiuo *HPFeedItemUpdateOne) ClearOwnerArtistID() *HPFeedItemUpdateOne
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (hfiuo *HPFeedItemUpdateOne) ClearOwnerMember() *HPFeedItemUpdateOne
ClearOwnerMember clears the "owner_member" edge to the HPMember entity.
func (hfiuo *HPFeedItemUpdateOne) ClearOwnerMemberID() *HPFeedItemUpdateOne
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (hfiuo *HPFeedItemUpdateOne) ClearTaggedArtists() *HPFeedItemUpdateOne
ClearTaggedArtists clears all "tagged_artists" edges to the HPArtist entity.
func (hfiuo *HPFeedItemUpdateOne) ClearTaggedMembers() *HPFeedItemUpdateOne
ClearTaggedMembers clears all "tagged_members" edges to the HPMember entity.
func (hfiuo *HPFeedItemUpdateOne) ClearUpdatedAt() *HPFeedItemUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (hfiuo *HPFeedItemUpdateOne) ClearViewHistories() *HPFeedItemUpdateOne
ClearViewHistories clears all "view_histories" edges to the HPViewHistory entity.
func (hfiuo *HPFeedItemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (hfiuo *HPFeedItemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hfiuo *HPFeedItemUpdateOne) Mutation() *HPFeedItemMutation
Mutation returns the HPFeedItemMutation object of the builder.
func (hfiuo *HPFeedItemUpdateOne) RemoveTaggedArtistIDs(ids ...int) *HPFeedItemUpdateOne
RemoveTaggedArtistIDs removes the "tagged_artists" edge to HPArtist entities by IDs.
func (hfiuo *HPFeedItemUpdateOne) RemoveTaggedArtists(h ...*HPArtist) *HPFeedItemUpdateOne
RemoveTaggedArtists removes "tagged_artists" edges to HPArtist entities.
func (hfiuo *HPFeedItemUpdateOne) RemoveTaggedMemberIDs(ids ...int) *HPFeedItemUpdateOne
RemoveTaggedMemberIDs removes the "tagged_members" edge to HPMember entities by IDs.
func (hfiuo *HPFeedItemUpdateOne) RemoveTaggedMembers(h ...*HPMember) *HPFeedItemUpdateOne
RemoveTaggedMembers removes "tagged_members" edges to HPMember entities.
func (hfiuo *HPFeedItemUpdateOne) RemoveViewHistories(h ...*HPViewHistory) *HPFeedItemUpdateOne
RemoveViewHistories removes "view_histories" edges to HPViewHistory entities.
func (hfiuo *HPFeedItemUpdateOne) RemoveViewHistoryIDs(ids ...int) *HPFeedItemUpdateOne
RemoveViewHistoryIDs removes the "view_histories" edge to HPViewHistory entities by IDs.
func (hfiuo *HPFeedItemUpdateOne) Save(ctx context.Context) (*HPFeedItem, error)
Save executes the query and returns the updated HPFeedItem entity.
func (hfiuo *HPFeedItemUpdateOne) SaveX(ctx context.Context) *HPFeedItem
SaveX is like Save, but panics if an error occurs.
func (hfiuo *HPFeedItemUpdateOne) Select(field string, fields ...string) *HPFeedItemUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (hfiuo *HPFeedItemUpdateOne) SetAssetType(eat enums.HPAssetType) *HPFeedItemUpdateOne
SetAssetType sets the "asset_type" field.
func (hfiuo *HPFeedItemUpdateOne) SetImageURL(s string) *HPFeedItemUpdateOne
SetImageURL sets the "image_url" field.
func (hfiuo *HPFeedItemUpdateOne) SetMedia(j []jsonfields.Media) *HPFeedItemUpdateOne
SetMedia sets the "media" field.
func (hfiuo *HPFeedItemUpdateOne) SetNillableAssetType(eat *enums.HPAssetType) *HPFeedItemUpdateOne
SetNillableAssetType sets the "asset_type" field if the given value is not nil.
func (hfiuo *HPFeedItemUpdateOne) SetNillableImageURL(s *string) *HPFeedItemUpdateOne
SetNillableImageURL sets the "image_url" field if the given value is not nil.
func (hfiuo *HPFeedItemUpdateOne) SetNillableOwnerArtistID(i *int) *HPFeedItemUpdateOne
SetNillableOwnerArtistID sets the "owner_artist_id" field if the given value is not nil.
func (hfiuo *HPFeedItemUpdateOne) SetNillableOwnerMemberID(i *int) *HPFeedItemUpdateOne
SetNillableOwnerMemberID sets the "owner_member_id" field if the given value is not nil.
func (hfiuo *HPFeedItemUpdateOne) SetNillableUpdatedAt(t *time.Time) *HPFeedItemUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hfiuo *HPFeedItemUpdateOne) SetOwnerArtist(h *HPArtist) *HPFeedItemUpdateOne
SetOwnerArtist sets the "owner_artist" edge to the HPArtist entity.
func (hfiuo *HPFeedItemUpdateOne) SetOwnerArtistID(i int) *HPFeedItemUpdateOne
SetOwnerArtistID sets the "owner_artist_id" field.
func (hfiuo *HPFeedItemUpdateOne) SetOwnerMember(h *HPMember) *HPFeedItemUpdateOne
SetOwnerMember sets the "owner_member" edge to the HPMember entity.
func (hfiuo *HPFeedItemUpdateOne) SetOwnerMemberID(i int) *HPFeedItemUpdateOne
SetOwnerMemberID sets the "owner_member_id" field.
func (hfiuo *HPFeedItemUpdateOne) SetPostAt(t time.Time) *HPFeedItemUpdateOne
SetPostAt sets the "post_at" field.
func (hfiuo *HPFeedItemUpdateOne) SetSourceID(i int) *HPFeedItemUpdateOne
SetSourceID sets the "source_id" field.
func (hfiuo *HPFeedItemUpdateOne) SetSourceURL(s string) *HPFeedItemUpdateOne
SetSourceURL sets the "source_url" field.
func (hfiuo *HPFeedItemUpdateOne) SetTitle(s string) *HPFeedItemUpdateOne
SetTitle sets the "title" field.
func (hfiuo *HPFeedItemUpdateOne) SetUpdatedAt(t time.Time) *HPFeedItemUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (hfiuo *HPFeedItemUpdateOne) Where(ps ...predicate.HPFeedItem) *HPFeedItemUpdateOne
Where appends a list predicates to the HPFeedItemUpdate builder.
HPFeedItemUpsert is the "OnConflict" setter.
type HPFeedItemUpsert struct {
*sql.UpdateSet
}
func (u *HPFeedItemUpsert) AddSourceID(v int) *HPFeedItemUpsert
AddSourceID adds v to the "source_id" field.
func (u *HPFeedItemUpsert) ClearImageURL() *HPFeedItemUpsert
ClearImageURL clears the value of the "image_url" field.
func (u *HPFeedItemUpsert) ClearOwnerArtistID() *HPFeedItemUpsert
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (u *HPFeedItemUpsert) ClearOwnerMemberID() *HPFeedItemUpsert
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (u *HPFeedItemUpsert) ClearUpdatedAt() *HPFeedItemUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPFeedItemUpsert) SetAssetType(v enums.HPAssetType) *HPFeedItemUpsert
SetAssetType sets the "asset_type" field.
func (u *HPFeedItemUpsert) SetImageURL(v string) *HPFeedItemUpsert
SetImageURL sets the "image_url" field.
func (u *HPFeedItemUpsert) SetMedia(v []jsonfields.Media) *HPFeedItemUpsert
SetMedia sets the "media" field.
func (u *HPFeedItemUpsert) SetOwnerArtistID(v int) *HPFeedItemUpsert
SetOwnerArtistID sets the "owner_artist_id" field.
func (u *HPFeedItemUpsert) SetOwnerMemberID(v int) *HPFeedItemUpsert
SetOwnerMemberID sets the "owner_member_id" field.
func (u *HPFeedItemUpsert) SetPostAt(v time.Time) *HPFeedItemUpsert
SetPostAt sets the "post_at" field.
func (u *HPFeedItemUpsert) SetSourceID(v int) *HPFeedItemUpsert
SetSourceID sets the "source_id" field.
func (u *HPFeedItemUpsert) SetSourceURL(v string) *HPFeedItemUpsert
SetSourceURL sets the "source_url" field.
func (u *HPFeedItemUpsert) SetTitle(v string) *HPFeedItemUpsert
SetTitle sets the "title" field.
func (u *HPFeedItemUpsert) SetUpdatedAt(v time.Time) *HPFeedItemUpsert
SetUpdatedAt sets the "updated_at" field.
func (u *HPFeedItemUpsert) UpdateAssetType() *HPFeedItemUpsert
UpdateAssetType sets the "asset_type" field to the value that was provided on create.
func (u *HPFeedItemUpsert) UpdateImageURL() *HPFeedItemUpsert
UpdateImageURL sets the "image_url" field to the value that was provided on create.
func (u *HPFeedItemUpsert) UpdateMedia() *HPFeedItemUpsert
UpdateMedia sets the "media" field to the value that was provided on create.
func (u *HPFeedItemUpsert) UpdateOwnerArtistID() *HPFeedItemUpsert
UpdateOwnerArtistID sets the "owner_artist_id" field to the value that was provided on create.
func (u *HPFeedItemUpsert) UpdateOwnerMemberID() *HPFeedItemUpsert
UpdateOwnerMemberID sets the "owner_member_id" field to the value that was provided on create.
func (u *HPFeedItemUpsert) UpdatePostAt() *HPFeedItemUpsert
UpdatePostAt sets the "post_at" field to the value that was provided on create.
func (u *HPFeedItemUpsert) UpdateSourceID() *HPFeedItemUpsert
UpdateSourceID sets the "source_id" field to the value that was provided on create.
func (u *HPFeedItemUpsert) UpdateSourceURL() *HPFeedItemUpsert
UpdateSourceURL sets the "source_url" field to the value that was provided on create.
func (u *HPFeedItemUpsert) UpdateTitle() *HPFeedItemUpsert
UpdateTitle sets the "title" field to the value that was provided on create.
func (u *HPFeedItemUpsert) UpdateUpdatedAt() *HPFeedItemUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPFeedItemUpsertBulk is the builder for "upsert"-ing a bulk of HPFeedItem nodes.
type HPFeedItemUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *HPFeedItemUpsertBulk) AddSourceID(v int) *HPFeedItemUpsertBulk
AddSourceID adds v to the "source_id" field.
func (u *HPFeedItemUpsertBulk) ClearImageURL() *HPFeedItemUpsertBulk
ClearImageURL clears the value of the "image_url" field.
func (u *HPFeedItemUpsertBulk) ClearOwnerArtistID() *HPFeedItemUpsertBulk
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (u *HPFeedItemUpsertBulk) ClearOwnerMemberID() *HPFeedItemUpsertBulk
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (u *HPFeedItemUpsertBulk) ClearUpdatedAt() *HPFeedItemUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPFeedItemUpsertBulk) DoNothing() *HPFeedItemUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPFeedItemUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPFeedItemUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPFeedItemUpsertBulk) Ignore() *HPFeedItemUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPFeedItem.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *HPFeedItemUpsertBulk) SetAssetType(v enums.HPAssetType) *HPFeedItemUpsertBulk
SetAssetType sets the "asset_type" field.
func (u *HPFeedItemUpsertBulk) SetImageURL(v string) *HPFeedItemUpsertBulk
SetImageURL sets the "image_url" field.
func (u *HPFeedItemUpsertBulk) SetMedia(v []jsonfields.Media) *HPFeedItemUpsertBulk
SetMedia sets the "media" field.
func (u *HPFeedItemUpsertBulk) SetOwnerArtistID(v int) *HPFeedItemUpsertBulk
SetOwnerArtistID sets the "owner_artist_id" field.
func (u *HPFeedItemUpsertBulk) SetOwnerMemberID(v int) *HPFeedItemUpsertBulk
SetOwnerMemberID sets the "owner_member_id" field.
func (u *HPFeedItemUpsertBulk) SetPostAt(v time.Time) *HPFeedItemUpsertBulk
SetPostAt sets the "post_at" field.
func (u *HPFeedItemUpsertBulk) SetSourceID(v int) *HPFeedItemUpsertBulk
SetSourceID sets the "source_id" field.
func (u *HPFeedItemUpsertBulk) SetSourceURL(v string) *HPFeedItemUpsertBulk
SetSourceURL sets the "source_url" field.
func (u *HPFeedItemUpsertBulk) SetTitle(v string) *HPFeedItemUpsertBulk
SetTitle sets the "title" field.
func (u *HPFeedItemUpsertBulk) SetUpdatedAt(v time.Time) *HPFeedItemUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (u *HPFeedItemUpsertBulk) Update(set func(*HPFeedItemUpsert)) *HPFeedItemUpsertBulk
Update allows overriding fields `UPDATE` values. See the HPFeedItemCreateBulk.OnConflict documentation for more info.
func (u *HPFeedItemUpsertBulk) UpdateAssetType() *HPFeedItemUpsertBulk
UpdateAssetType sets the "asset_type" field to the value that was provided on create.
func (u *HPFeedItemUpsertBulk) UpdateImageURL() *HPFeedItemUpsertBulk
UpdateImageURL sets the "image_url" field to the value that was provided on create.
func (u *HPFeedItemUpsertBulk) UpdateMedia() *HPFeedItemUpsertBulk
UpdateMedia sets the "media" field to the value that was provided on create.
func (u *HPFeedItemUpsertBulk) UpdateNewValues() *HPFeedItemUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPFeedItem.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPFeedItemUpsertBulk) UpdateOwnerArtistID() *HPFeedItemUpsertBulk
UpdateOwnerArtistID sets the "owner_artist_id" field to the value that was provided on create.
func (u *HPFeedItemUpsertBulk) UpdateOwnerMemberID() *HPFeedItemUpsertBulk
UpdateOwnerMemberID sets the "owner_member_id" field to the value that was provided on create.
func (u *HPFeedItemUpsertBulk) UpdatePostAt() *HPFeedItemUpsertBulk
UpdatePostAt sets the "post_at" field to the value that was provided on create.
func (u *HPFeedItemUpsertBulk) UpdateSourceID() *HPFeedItemUpsertBulk
UpdateSourceID sets the "source_id" field to the value that was provided on create.
func (u *HPFeedItemUpsertBulk) UpdateSourceURL() *HPFeedItemUpsertBulk
UpdateSourceURL sets the "source_url" field to the value that was provided on create.
func (u *HPFeedItemUpsertBulk) UpdateTitle() *HPFeedItemUpsertBulk
UpdateTitle sets the "title" field to the value that was provided on create.
func (u *HPFeedItemUpsertBulk) UpdateUpdatedAt() *HPFeedItemUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPFeedItemUpsertOne is the builder for "upsert"-ing
one HPFeedItem node.
type HPFeedItemUpsertOne struct {
// contains filtered or unexported fields
}
func (u *HPFeedItemUpsertOne) AddSourceID(v int) *HPFeedItemUpsertOne
AddSourceID adds v to the "source_id" field.
func (u *HPFeedItemUpsertOne) ClearImageURL() *HPFeedItemUpsertOne
ClearImageURL clears the value of the "image_url" field.
func (u *HPFeedItemUpsertOne) ClearOwnerArtistID() *HPFeedItemUpsertOne
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (u *HPFeedItemUpsertOne) ClearOwnerMemberID() *HPFeedItemUpsertOne
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (u *HPFeedItemUpsertOne) ClearUpdatedAt() *HPFeedItemUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPFeedItemUpsertOne) DoNothing() *HPFeedItemUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPFeedItemUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPFeedItemUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPFeedItemUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *HPFeedItemUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *HPFeedItemUpsertOne) Ignore() *HPFeedItemUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPFeedItem.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *HPFeedItemUpsertOne) SetAssetType(v enums.HPAssetType) *HPFeedItemUpsertOne
SetAssetType sets the "asset_type" field.
func (u *HPFeedItemUpsertOne) SetImageURL(v string) *HPFeedItemUpsertOne
SetImageURL sets the "image_url" field.
func (u *HPFeedItemUpsertOne) SetMedia(v []jsonfields.Media) *HPFeedItemUpsertOne
SetMedia sets the "media" field.
func (u *HPFeedItemUpsertOne) SetOwnerArtistID(v int) *HPFeedItemUpsertOne
SetOwnerArtistID sets the "owner_artist_id" field.
func (u *HPFeedItemUpsertOne) SetOwnerMemberID(v int) *HPFeedItemUpsertOne
SetOwnerMemberID sets the "owner_member_id" field.
func (u *HPFeedItemUpsertOne) SetPostAt(v time.Time) *HPFeedItemUpsertOne
SetPostAt sets the "post_at" field.
func (u *HPFeedItemUpsertOne) SetSourceID(v int) *HPFeedItemUpsertOne
SetSourceID sets the "source_id" field.
func (u *HPFeedItemUpsertOne) SetSourceURL(v string) *HPFeedItemUpsertOne
SetSourceURL sets the "source_url" field.
func (u *HPFeedItemUpsertOne) SetTitle(v string) *HPFeedItemUpsertOne
SetTitle sets the "title" field.
func (u *HPFeedItemUpsertOne) SetUpdatedAt(v time.Time) *HPFeedItemUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (u *HPFeedItemUpsertOne) Update(set func(*HPFeedItemUpsert)) *HPFeedItemUpsertOne
Update allows overriding fields `UPDATE` values. See the HPFeedItemCreate.OnConflict documentation for more info.
func (u *HPFeedItemUpsertOne) UpdateAssetType() *HPFeedItemUpsertOne
UpdateAssetType sets the "asset_type" field to the value that was provided on create.
func (u *HPFeedItemUpsertOne) UpdateImageURL() *HPFeedItemUpsertOne
UpdateImageURL sets the "image_url" field to the value that was provided on create.
func (u *HPFeedItemUpsertOne) UpdateMedia() *HPFeedItemUpsertOne
UpdateMedia sets the "media" field to the value that was provided on create.
func (u *HPFeedItemUpsertOne) UpdateNewValues() *HPFeedItemUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPFeedItem.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPFeedItemUpsertOne) UpdateOwnerArtistID() *HPFeedItemUpsertOne
UpdateOwnerArtistID sets the "owner_artist_id" field to the value that was provided on create.
func (u *HPFeedItemUpsertOne) UpdateOwnerMemberID() *HPFeedItemUpsertOne
UpdateOwnerMemberID sets the "owner_member_id" field to the value that was provided on create.
func (u *HPFeedItemUpsertOne) UpdatePostAt() *HPFeedItemUpsertOne
UpdatePostAt sets the "post_at" field to the value that was provided on create.
func (u *HPFeedItemUpsertOne) UpdateSourceID() *HPFeedItemUpsertOne
UpdateSourceID sets the "source_id" field to the value that was provided on create.
func (u *HPFeedItemUpsertOne) UpdateSourceURL() *HPFeedItemUpsertOne
UpdateSourceURL sets the "source_url" field to the value that was provided on create.
func (u *HPFeedItemUpsertOne) UpdateTitle() *HPFeedItemUpsertOne
UpdateTitle sets the "title" field to the value that was provided on create.
func (u *HPFeedItemUpsertOne) UpdateUpdatedAt() *HPFeedItemUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPFeedItems is a parsable slice of HPFeedItem.
type HPFeedItems []*HPFeedItem
HPFollow is the model entity for the HPFollow schema.
type HPFollow struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Type holds the value of the "type" field.
Type enums.HPFollowType `json:"type,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the HPFollowQuery when eager-loading is set.
Edges HPFollowEdges `json:"edges"`
// contains filtered or unexported fields
}
func (n *HPFollow) IsNode()
IsNode implements the Node interface check for GQLGen.
func (hf *HPFollow) Member(ctx context.Context) (*HPMember, error)
func (hf *HPFollow) QueryMember() *HPMemberQuery
QueryMember queries the "member" edge of the HPFollow entity.
func (hf *HPFollow) QueryUser() *UserQuery
QueryUser queries the "user" edge of the HPFollow entity.
func (hf *HPFollow) String() string
String implements the fmt.Stringer.
func (hf *HPFollow) ToEdge(order *HPFollowOrder) *HPFollowEdge
ToEdge converts HPFollow into HPFollowEdge.
func (hf *HPFollow) Unwrap() *HPFollow
Unwrap unwraps the HPFollow entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (hf *HPFollow) Update() *HPFollowUpdateOne
Update returns a builder for updating this HPFollow. Note that you need to call HPFollow.Unwrap() before calling this method if this HPFollow was returned from a transaction, and the transaction was committed or rolled back.
func (hf *HPFollow) User(ctx context.Context) (*User, error)
func (hf *HPFollow) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the HPFollow. This includes values selected through modifiers, order, etc.
HPFollowClient is a client for the HPFollow schema.
type HPFollowClient struct {
// contains filtered or unexported fields
}
func NewHPFollowClient(c config) *HPFollowClient
NewHPFollowClient returns a client for the HPFollow from the given config.
func (c *HPFollowClient) Create() *HPFollowCreate
Create returns a builder for creating a HPFollow entity.
func (c *HPFollowClient) CreateBulk(builders ...*HPFollowCreate) *HPFollowCreateBulk
CreateBulk returns a builder for creating a bulk of HPFollow entities.
func (c *HPFollowClient) Delete() *HPFollowDelete
Delete returns a delete builder for HPFollow.
func (c *HPFollowClient) DeleteOne(hf *HPFollow) *HPFollowDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *HPFollowClient) DeleteOneID(id int) *HPFollowDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *HPFollowClient) Get(ctx context.Context, id int) (*HPFollow, error)
Get returns a HPFollow entity by its id.
func (c *HPFollowClient) GetX(ctx context.Context, id int) *HPFollow
GetX is like Get, but panics if an error occurs.
func (c *HPFollowClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *HPFollowClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hpfollow.Intercept(f(g(h())))`.
func (c *HPFollowClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *HPFollowClient) Query() *HPFollowQuery
Query returns a query builder for HPFollow.
func (c *HPFollowClient) QueryMember(hf *HPFollow) *HPMemberQuery
QueryMember queries the member edge of a HPFollow.
func (c *HPFollowClient) QueryUser(hf *HPFollow) *UserQuery
QueryUser queries the user edge of a HPFollow.
func (c *HPFollowClient) Update() *HPFollowUpdate
Update returns an update builder for HPFollow.
func (c *HPFollowClient) UpdateOne(hf *HPFollow) *HPFollowUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *HPFollowClient) UpdateOneID(id int) *HPFollowUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *HPFollowClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hpfollow.Hooks(f(g(h())))`.
HPFollowConnection is the connection containing edges to HPFollow.
type HPFollowConnection struct {
Edges []*HPFollowEdge `json:"edges"`
PageInfo PageInfo `json:"pageInfo"`
TotalCount int `json:"totalCount"`
}
HPFollowCreate is the builder for creating a HPFollow entity.
type HPFollowCreate struct {
// contains filtered or unexported fields
}
func (hfc *HPFollowCreate) Exec(ctx context.Context) error
Exec executes the query.
func (hfc *HPFollowCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hfc *HPFollowCreate) Mutation() *HPFollowMutation
Mutation returns the HPFollowMutation object of the builder.
func (hfc *HPFollowCreate) OnConflict(opts ...sql.ConflictOption) *HPFollowUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPFollow.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPFollowUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (hfc *HPFollowCreate) OnConflictColumns(columns ...string) *HPFollowUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPFollow.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hfc *HPFollowCreate) Save(ctx context.Context) (*HPFollow, error)
Save creates the HPFollow in the database.
func (hfc *HPFollowCreate) SaveX(ctx context.Context) *HPFollow
SaveX calls Save and panics if Save returns an error.
func (hfc *HPFollowCreate) SetCreatedAt(t time.Time) *HPFollowCreate
SetCreatedAt sets the "created_at" field.
func (hfc *HPFollowCreate) SetMember(h *HPMember) *HPFollowCreate
SetMember sets the "member" edge to the HPMember entity.
func (hfc *HPFollowCreate) SetMemberID(id int) *HPFollowCreate
SetMemberID sets the "member" edge to the HPMember entity by ID.
func (hfc *HPFollowCreate) SetNillableCreatedAt(t *time.Time) *HPFollowCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (hfc *HPFollowCreate) SetNillableType(eft *enums.HPFollowType) *HPFollowCreate
SetNillableType sets the "type" field if the given value is not nil.
func (hfc *HPFollowCreate) SetNillableUpdatedAt(t *time.Time) *HPFollowCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hfc *HPFollowCreate) SetType(eft enums.HPFollowType) *HPFollowCreate
SetType sets the "type" field.
func (hfc *HPFollowCreate) SetUpdatedAt(t time.Time) *HPFollowCreate
SetUpdatedAt sets the "updated_at" field.
func (hfc *HPFollowCreate) SetUser(u *User) *HPFollowCreate
SetUser sets the "user" edge to the User entity.
func (hfc *HPFollowCreate) SetUserID(id int) *HPFollowCreate
SetUserID sets the "user" edge to the User entity by ID.
HPFollowCreateBulk is the builder for creating many HPFollow entities in bulk.
type HPFollowCreateBulk struct {
// contains filtered or unexported fields
}
func (hfcb *HPFollowCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (hfcb *HPFollowCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hfcb *HPFollowCreateBulk) OnConflict(opts ...sql.ConflictOption) *HPFollowUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPFollow.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPFollowUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (hfcb *HPFollowCreateBulk) OnConflictColumns(columns ...string) *HPFollowUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPFollow.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hfcb *HPFollowCreateBulk) Save(ctx context.Context) ([]*HPFollow, error)
Save creates the HPFollow entities in the database.
func (hfcb *HPFollowCreateBulk) SaveX(ctx context.Context) []*HPFollow
SaveX is like Save, but panics if an error occurs.
HPFollowDelete is the builder for deleting a HPFollow entity.
type HPFollowDelete struct {
// contains filtered or unexported fields
}
func (hfd *HPFollowDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (hfd *HPFollowDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (hfd *HPFollowDelete) Where(ps ...predicate.HPFollow) *HPFollowDelete
Where appends a list predicates to the HPFollowDelete builder.
HPFollowDeleteOne is the builder for deleting a single HPFollow entity.
type HPFollowDeleteOne struct {
// contains filtered or unexported fields
}
func (hfdo *HPFollowDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (hfdo *HPFollowDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hfdo *HPFollowDeleteOne) Where(ps ...predicate.HPFollow) *HPFollowDeleteOne
Where appends a list predicates to the HPFollowDelete builder.
HPFollowEdge is the edge representation of HPFollow.
type HPFollowEdge struct {
Node *HPFollow `json:"node"`
Cursor Cursor `json:"cursor"`
}
HPFollowEdges holds the relations/edges for other nodes in the graph.
type HPFollowEdges struct {
// User holds the value of the user edge.
User *User `json:"user,omitempty"`
// Member holds the value of the member edge.
Member *HPMember `json:"member,omitempty"`
// contains filtered or unexported fields
}
func (e HPFollowEdges) MemberOrErr() (*HPMember, error)
MemberOrErr returns the Member value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (e HPFollowEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
HPFollowFilter provides a generic filtering capability at runtime for HPFollowQuery.
type HPFollowFilter struct {
// contains filtered or unexported fields
}
func (f *HPFollowFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *HPFollowFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (f *HPFollowFilter) WhereHasMember()
WhereHasMember applies a predicate to check if query has an edge member.
func (f *HPFollowFilter) WhereHasMemberWith(preds ...predicate.HPMember)
WhereHasMemberWith applies a predicate to check if query has an edge member with a given conditions (other predicates).
func (f *HPFollowFilter) WhereHasUser()
WhereHasUser applies a predicate to check if query has an edge user.
func (f *HPFollowFilter) WhereHasUserWith(preds ...predicate.User)
WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).
func (f *HPFollowFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *HPFollowFilter) WhereType(p entql.StringP)
WhereType applies the entql string predicate on the type field.
func (f *HPFollowFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
HPFollowGroupBy is the group-by builder for HPFollow entities.
type HPFollowGroupBy struct {
// contains filtered or unexported fields
}
func (hfgb *HPFollowGroupBy) Aggregate(fns ...AggregateFunc) *HPFollowGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *HPFollowGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPFollowGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPFollowGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPFollowGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPFollowGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPFollowGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPFollowGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPFollowGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPFollowGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPFollowGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPFollowGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPFollowGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hfgb *HPFollowGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPFollowGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPFollowGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPFollowGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPFollowGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPFollowGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPFollowMutation represents an operation that mutates the HPFollow nodes in the graph.
type HPFollowMutation struct {
// contains filtered or unexported fields
}
func (m *HPFollowMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPFollowMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *HPFollowMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPFollowMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *HPFollowMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *HPFollowMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (m *HPFollowMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *HPFollowMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPFollowMutation) ClearMember()
ClearMember clears the "member" edge to the HPMember entity.
func (m *HPFollowMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (m *HPFollowMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (m *HPFollowMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *HPFollowMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m HPFollowMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *HPFollowMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (m *HPFollowMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (m *HPFollowMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *HPFollowMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPFollowMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *HPFollowMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *HPFollowMutation) Filter() *HPFollowFilter
Filter returns an entql.Where implementation to apply filters on the HPFollowMutation builder.
func (m *HPFollowMutation) GetType() (r enums.HPFollowType, exists bool)
GetType returns the value of the "type" field in the mutation.
func (m *HPFollowMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *HPFollowMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *HPFollowMutation) MemberCleared() bool
MemberCleared reports if the "member" edge to the HPMember entity was cleared.
func (m *HPFollowMutation) MemberID() (id int, exists bool)
MemberID returns the "member" edge ID in the mutation.
func (m *HPFollowMutation) MemberIDs() (ids []int)
MemberIDs returns the "member" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MemberID instead. It exists only for internal usage by the builders.
func (m *HPFollowMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
OldCreatedAt returns the old "created_at" field's value of the HPFollow entity. If the HPFollow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFollowMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *HPFollowMutation) OldType(ctx context.Context) (v enums.HPFollowType, err error)
OldType returns the old "type" field's value of the HPFollow entity. If the HPFollow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFollowMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
OldUpdatedAt returns the old "updated_at" field's value of the HPFollow entity. If the HPFollow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPFollowMutation) Op() Op
Op returns the operation name.
func (m *HPFollowMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *HPFollowMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *HPFollowMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (m *HPFollowMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *HPFollowMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPFollowMutation) ResetMember()
ResetMember resets all changes to the "member" edge.
func (m *HPFollowMutation) ResetType()
ResetType resets all changes to the "type" field.
func (m *HPFollowMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (m *HPFollowMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (m *HPFollowMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (m *HPFollowMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPFollowMutation) SetMemberID(id int)
SetMemberID sets the "member" edge to the HPMember entity by id.
func (m *HPFollowMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *HPFollowMutation) SetType(eft enums.HPFollowType)
SetType sets the "type" field.
func (m *HPFollowMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (m *HPFollowMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (m HPFollowMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *HPFollowMutation) Type() string
Type returns the node type of this mutation (HPFollow).
func (m *HPFollowMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (m *HPFollowMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (m *HPFollowMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (m *HPFollowMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (m *HPFollowMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (m *HPFollowMutation) Where(ps ...predicate.HPFollow)
Where appends a list predicates to the HPFollowMutation builder.
func (m *HPFollowMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HPFollowMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
HPFollowOrder defines the ordering of HPFollow.
type HPFollowOrder struct {
Direction OrderDirection `json:"direction"`
Field *HPFollowOrderField `json:"field"`
}
HPFollowOrderField defines the ordering field of HPFollow.
type HPFollowOrderField struct {
// contains filtered or unexported fields
}
HPFollowPaginateOption enables pagination customization.
type HPFollowPaginateOption func(*hpfollowPager) error
func WithHPFollowFilter(filter func(*HPFollowQuery) (*HPFollowQuery, error)) HPFollowPaginateOption
WithHPFollowFilter configures pagination filter.
func WithHPFollowOrder(order *HPFollowOrder) HPFollowPaginateOption
WithHPFollowOrder configures pagination ordering.
HPFollowQuery is the builder for querying HPFollow entities.
type HPFollowQuery struct {
// contains filtered or unexported fields
}
func (hfq *HPFollowQuery) Aggregate(fns ...AggregateFunc) *HPFollowSelect
Aggregate returns a HPFollowSelect configured with the given aggregations.
func (hfq *HPFollowQuery) All(ctx context.Context) ([]*HPFollow, error)
All executes the query and returns a list of HPFollows.
func (hfq *HPFollowQuery) AllX(ctx context.Context) []*HPFollow
AllX is like All, but panics if an error occurs.
func (hfq *HPFollowQuery) Clone() *HPFollowQuery
Clone returns a duplicate of the HPFollowQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (hf *HPFollowQuery) CollectFields(ctx context.Context, satisfies ...string) (*HPFollowQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (hfq *HPFollowQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (hfq *HPFollowQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (hfq *HPFollowQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (hfq *HPFollowQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (hfq *HPFollowQuery) Filter() *HPFollowFilter
Filter returns a Filter implementation to apply filters on the HPFollowQuery builder.
func (hfq *HPFollowQuery) First(ctx context.Context) (*HPFollow, error)
First returns the first HPFollow entity from the query. Returns a *NotFoundError when no HPFollow was found.
func (hfq *HPFollowQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first HPFollow ID from the query. Returns a *NotFoundError when no HPFollow ID was found.
func (hfq *HPFollowQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (hfq *HPFollowQuery) FirstX(ctx context.Context) *HPFollow
FirstX is like First, but panics if an error occurs.
func (hfq *HPFollowQuery) GroupBy(field string, fields ...string) *HPFollowGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.HPFollow.Query().
GroupBy(hpfollow.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (hfq *HPFollowQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of HPFollow IDs.
func (hfq *HPFollowQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (hfq *HPFollowQuery) Limit(limit int) *HPFollowQuery
Limit the number of records to be returned by this query.
func (hfq *HPFollowQuery) Offset(offset int) *HPFollowQuery
Offset to start from.
func (hfq *HPFollowQuery) Only(ctx context.Context) (*HPFollow, error)
Only returns a single HPFollow entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HPFollow entity is found. Returns a *NotFoundError when no HPFollow entities are found.
func (hfq *HPFollowQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only HPFollow ID in the query. Returns a *NotSingularError when more than one HPFollow ID is found. Returns a *NotFoundError when no entities are found.
func (hfq *HPFollowQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (hfq *HPFollowQuery) OnlyX(ctx context.Context) *HPFollow
OnlyX is like Only, but panics if an error occurs.
func (hfq *HPFollowQuery) Order(o ...hpfollow.Order) *HPFollowQuery
Order specifies how the records should be ordered.
func (hf *HPFollowQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...HPFollowPaginateOption, ) (*HPFollowConnection, error)
Paginate executes the query and returns a relay based cursor connection to HPFollow.
func (hfq *HPFollowQuery) QueryMember() *HPMemberQuery
QueryMember chains the current query on the "member" edge.
func (hfq *HPFollowQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (hfq *HPFollowQuery) Select(fields ...string) *HPFollowSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.HPFollow.Query().
Select(hpfollow.FieldCreatedAt).
Scan(ctx, &v)
func (hfq *HPFollowQuery) Unique(unique bool) *HPFollowQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (hfq *HPFollowQuery) Where(ps ...predicate.HPFollow) *HPFollowQuery
Where adds a new predicate for the HPFollowQuery builder.
func (hfq *HPFollowQuery) WithMember(opts ...func(*HPMemberQuery)) *HPFollowQuery
WithMember tells the query-builder to eager-load the nodes that are connected to the "member" edge. The optional arguments are used to configure the query builder of the edge.
func (hfq *HPFollowQuery) WithUser(opts ...func(*UserQuery)) *HPFollowQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
HPFollowSelect is the builder for selecting fields of HPFollow entities.
type HPFollowSelect struct {
*HPFollowQuery
// contains filtered or unexported fields
}
func (hfs *HPFollowSelect) Aggregate(fns ...AggregateFunc) *HPFollowSelect
Aggregate adds the given aggregation functions to the selector query.
func (s *HPFollowSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPFollowSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPFollowSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPFollowSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPFollowSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPFollowSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPFollowSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPFollowSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPFollowSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPFollowSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPFollowSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPFollowSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hfs *HPFollowSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPFollowSelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPFollowSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPFollowSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPFollowSelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPFollowSelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPFollowUpdate is the builder for updating HPFollow entities.
type HPFollowUpdate struct {
// contains filtered or unexported fields
}
func (hfu *HPFollowUpdate) ClearMember() *HPFollowUpdate
ClearMember clears the "member" edge to the HPMember entity.
func (hfu *HPFollowUpdate) ClearUpdatedAt() *HPFollowUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (hfu *HPFollowUpdate) ClearUser() *HPFollowUpdate
ClearUser clears the "user" edge to the User entity.
func (hfu *HPFollowUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (hfu *HPFollowUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hfu *HPFollowUpdate) Mutation() *HPFollowMutation
Mutation returns the HPFollowMutation object of the builder.
func (hfu *HPFollowUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (hfu *HPFollowUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (hfu *HPFollowUpdate) SetMember(h *HPMember) *HPFollowUpdate
SetMember sets the "member" edge to the HPMember entity.
func (hfu *HPFollowUpdate) SetMemberID(id int) *HPFollowUpdate
SetMemberID sets the "member" edge to the HPMember entity by ID.
func (hfu *HPFollowUpdate) SetNillableType(eft *enums.HPFollowType) *HPFollowUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (hfu *HPFollowUpdate) SetNillableUpdatedAt(t *time.Time) *HPFollowUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hfu *HPFollowUpdate) SetType(eft enums.HPFollowType) *HPFollowUpdate
SetType sets the "type" field.
func (hfu *HPFollowUpdate) SetUpdatedAt(t time.Time) *HPFollowUpdate
SetUpdatedAt sets the "updated_at" field.
func (hfu *HPFollowUpdate) SetUser(u *User) *HPFollowUpdate
SetUser sets the "user" edge to the User entity.
func (hfu *HPFollowUpdate) SetUserID(id int) *HPFollowUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (hfu *HPFollowUpdate) Where(ps ...predicate.HPFollow) *HPFollowUpdate
Where appends a list predicates to the HPFollowUpdate builder.
HPFollowUpdateOne is the builder for updating a single HPFollow entity.
type HPFollowUpdateOne struct {
// contains filtered or unexported fields
}
func (hfuo *HPFollowUpdateOne) ClearMember() *HPFollowUpdateOne
ClearMember clears the "member" edge to the HPMember entity.
func (hfuo *HPFollowUpdateOne) ClearUpdatedAt() *HPFollowUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (hfuo *HPFollowUpdateOne) ClearUser() *HPFollowUpdateOne
ClearUser clears the "user" edge to the User entity.
func (hfuo *HPFollowUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (hfuo *HPFollowUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hfuo *HPFollowUpdateOne) Mutation() *HPFollowMutation
Mutation returns the HPFollowMutation object of the builder.
func (hfuo *HPFollowUpdateOne) Save(ctx context.Context) (*HPFollow, error)
Save executes the query and returns the updated HPFollow entity.
func (hfuo *HPFollowUpdateOne) SaveX(ctx context.Context) *HPFollow
SaveX is like Save, but panics if an error occurs.
func (hfuo *HPFollowUpdateOne) Select(field string, fields ...string) *HPFollowUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (hfuo *HPFollowUpdateOne) SetMember(h *HPMember) *HPFollowUpdateOne
SetMember sets the "member" edge to the HPMember entity.
func (hfuo *HPFollowUpdateOne) SetMemberID(id int) *HPFollowUpdateOne
SetMemberID sets the "member" edge to the HPMember entity by ID.
func (hfuo *HPFollowUpdateOne) SetNillableType(eft *enums.HPFollowType) *HPFollowUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (hfuo *HPFollowUpdateOne) SetNillableUpdatedAt(t *time.Time) *HPFollowUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hfuo *HPFollowUpdateOne) SetType(eft enums.HPFollowType) *HPFollowUpdateOne
SetType sets the "type" field.
func (hfuo *HPFollowUpdateOne) SetUpdatedAt(t time.Time) *HPFollowUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (hfuo *HPFollowUpdateOne) SetUser(u *User) *HPFollowUpdateOne
SetUser sets the "user" edge to the User entity.
func (hfuo *HPFollowUpdateOne) SetUserID(id int) *HPFollowUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (hfuo *HPFollowUpdateOne) Where(ps ...predicate.HPFollow) *HPFollowUpdateOne
Where appends a list predicates to the HPFollowUpdate builder.
HPFollowUpsert is the "OnConflict" setter.
type HPFollowUpsert struct {
*sql.UpdateSet
}
func (u *HPFollowUpsert) ClearUpdatedAt() *HPFollowUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPFollowUpsert) SetType(v enums.HPFollowType) *HPFollowUpsert
SetType sets the "type" field.
func (u *HPFollowUpsert) SetUpdatedAt(v time.Time) *HPFollowUpsert
SetUpdatedAt sets the "updated_at" field.
func (u *HPFollowUpsert) UpdateType() *HPFollowUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (u *HPFollowUpsert) UpdateUpdatedAt() *HPFollowUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPFollowUpsertBulk is the builder for "upsert"-ing a bulk of HPFollow nodes.
type HPFollowUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *HPFollowUpsertBulk) ClearUpdatedAt() *HPFollowUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPFollowUpsertBulk) DoNothing() *HPFollowUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPFollowUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPFollowUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPFollowUpsertBulk) Ignore() *HPFollowUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPFollow.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *HPFollowUpsertBulk) SetType(v enums.HPFollowType) *HPFollowUpsertBulk
SetType sets the "type" field.
func (u *HPFollowUpsertBulk) SetUpdatedAt(v time.Time) *HPFollowUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (u *HPFollowUpsertBulk) Update(set func(*HPFollowUpsert)) *HPFollowUpsertBulk
Update allows overriding fields `UPDATE` values. See the HPFollowCreateBulk.OnConflict documentation for more info.
func (u *HPFollowUpsertBulk) UpdateNewValues() *HPFollowUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPFollow.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPFollowUpsertBulk) UpdateType() *HPFollowUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (u *HPFollowUpsertBulk) UpdateUpdatedAt() *HPFollowUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPFollowUpsertOne is the builder for "upsert"-ing
one HPFollow node.
type HPFollowUpsertOne struct {
// contains filtered or unexported fields
}
func (u *HPFollowUpsertOne) ClearUpdatedAt() *HPFollowUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPFollowUpsertOne) DoNothing() *HPFollowUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPFollowUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPFollowUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPFollowUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *HPFollowUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *HPFollowUpsertOne) Ignore() *HPFollowUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPFollow.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *HPFollowUpsertOne) SetType(v enums.HPFollowType) *HPFollowUpsertOne
SetType sets the "type" field.
func (u *HPFollowUpsertOne) SetUpdatedAt(v time.Time) *HPFollowUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (u *HPFollowUpsertOne) Update(set func(*HPFollowUpsert)) *HPFollowUpsertOne
Update allows overriding fields `UPDATE` values. See the HPFollowCreate.OnConflict documentation for more info.
func (u *HPFollowUpsertOne) UpdateNewValues() *HPFollowUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPFollow.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPFollowUpsertOne) UpdateType() *HPFollowUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (u *HPFollowUpsertOne) UpdateUpdatedAt() *HPFollowUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPFollows is a parsable slice of HPFollow.
type HPFollows []*HPFollow
HPIgPost is the model entity for the HPIgPost schema.
type HPIgPost struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CrawledAt holds the value of the "crawled_at" field.
CrawledAt *time.Time `json:"crawled_at,omitempty"`
// ErrorCount holds the value of the "error_count" field.
ErrorCount int `json:"error_count,omitempty"`
// ManuallyModified holds the value of the "manually_modified" field.
ManuallyModified *jsonfields.ManuallyModified `json:"manually_modified,omitempty"`
// LastErrorMessage holds the value of the "last_error_message" field.
LastErrorMessage *string `json:"last_error_message,omitempty"`
// RecrawlRequired holds the value of the "recrawl_required" field.
RecrawlRequired bool `json:"recrawl_required,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Shortcode holds the value of the "shortcode" field.
Shortcode string `json:"shortcode,omitempty"`
// Description holds the value of the "description" field.
Description string `json:"description,omitempty"`
// PostAt holds the value of the "post_at" field.
PostAt time.Time `json:"post_at,omitempty"`
// Media holds the value of the "media" field.
Media []jsonfields.Media `json:"media,omitempty"`
// Likes holds the value of the "likes" field.
Likes int `json:"likes,omitempty"`
// Comments holds the value of the "comments" field.
Comments int `json:"comments,omitempty"`
// RecrawlArgs holds the value of the "recrawl_args" field.
RecrawlArgs *jsonfields.HPIgCrawlArgs `json:"recrawl_args,omitempty"`
// OwnerArtistID holds the value of the "owner_artist_id" field.
OwnerArtistID *int `json:"owner_artist_id,omitempty"`
// OwnerMemberID holds the value of the "owner_member_id" field.
OwnerMemberID *int `json:"owner_member_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the HPIgPostQuery when eager-loading is set.
Edges HPIgPostEdges `json:"edges"`
// contains filtered or unexported fields
}
func (hip *HPIgPost) Blobs(ctx context.Context) (result []*HPBlob, err error)
func (n *HPIgPost) IsNode()
IsNode implements the Node interface check for GQLGen.
func (hip *HPIgPost) NamedBlobs(name string) ([]*HPBlob, error)
NamedBlobs returns the Blobs named value or an error if the edge was not loaded in eager-loading with this name.
func (hip *HPIgPost) NamedTaggedArtists(name string) ([]*HPArtist, error)
NamedTaggedArtists returns the TaggedArtists named value or an error if the edge was not loaded in eager-loading with this name.
func (hip *HPIgPost) NamedTaggedMembers(name string) ([]*HPMember, error)
NamedTaggedMembers returns the TaggedMembers named value or an error if the edge was not loaded in eager-loading with this name.
func (hip *HPIgPost) OwnerArtist(ctx context.Context) (*HPArtist, error)
func (hip *HPIgPost) OwnerMember(ctx context.Context) (*HPMember, error)
func (hip *HPIgPost) QueryAsset() *HPAssetQuery
QueryAsset queries the "asset" edge of the HPIgPost entity.
func (hip *HPIgPost) QueryBlobs() *HPBlobQuery
QueryBlobs queries the "blobs" edge of the HPIgPost entity.
func (hip *HPIgPost) QueryOwnerArtist() *HPArtistQuery
QueryOwnerArtist queries the "owner_artist" edge of the HPIgPost entity.
func (hip *HPIgPost) QueryOwnerMember() *HPMemberQuery
QueryOwnerMember queries the "owner_member" edge of the HPIgPost entity.
func (hip *HPIgPost) QueryTaggedArtists() *HPArtistQuery
QueryTaggedArtists queries the "tagged_artists" edge of the HPIgPost entity.
func (hip *HPIgPost) QueryTaggedMembers() *HPMemberQuery
QueryTaggedMembers queries the "tagged_members" edge of the HPIgPost entity.
func (hip *HPIgPost) String() string
String implements the fmt.Stringer.
func (hip *HPIgPost) TaggedArtists(ctx context.Context) (result []*HPArtist, err error)
func (hip *HPIgPost) TaggedMembers(ctx context.Context) (result []*HPMember, err error)
func (hip *HPIgPost) ToEdge(order *HPIgPostOrder) *HPIgPostEdge
ToEdge converts HPIgPost into HPIgPostEdge.
func (hip *HPIgPost) Unwrap() *HPIgPost
Unwrap unwraps the HPIgPost entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (hip *HPIgPost) Update() *HPIgPostUpdateOne
Update returns a builder for updating this HPIgPost. Note that you need to call HPIgPost.Unwrap() before calling this method if this HPIgPost was returned from a transaction, and the transaction was committed or rolled back.
func (hip *HPIgPost) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the HPIgPost. This includes values selected through modifiers, order, etc.
HPIgPostClient is a client for the HPIgPost schema.
type HPIgPostClient struct {
// contains filtered or unexported fields
}
func NewHPIgPostClient(c config) *HPIgPostClient
NewHPIgPostClient returns a client for the HPIgPost from the given config.
func (c *HPIgPostClient) Create() *HPIgPostCreate
Create returns a builder for creating a HPIgPost entity.
func (c *HPIgPostClient) CreateBulk(builders ...*HPIgPostCreate) *HPIgPostCreateBulk
CreateBulk returns a builder for creating a bulk of HPIgPost entities.
func (c *HPIgPostClient) Delete() *HPIgPostDelete
Delete returns a delete builder for HPIgPost.
func (c *HPIgPostClient) DeleteOne(hip *HPIgPost) *HPIgPostDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *HPIgPostClient) DeleteOneID(id int) *HPIgPostDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *HPIgPostClient) Get(ctx context.Context, id int) (*HPIgPost, error)
Get returns a HPIgPost entity by its id.
func (c *HPIgPostClient) GetX(ctx context.Context, id int) *HPIgPost
GetX is like Get, but panics if an error occurs.
func (c *HPIgPostClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *HPIgPostClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hpigpost.Intercept(f(g(h())))`.
func (c *HPIgPostClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *HPIgPostClient) Query() *HPIgPostQuery
Query returns a query builder for HPIgPost.
func (c *HPIgPostClient) QueryAsset(hip *HPIgPost) *HPAssetQuery
QueryAsset queries the asset edge of a HPIgPost.
func (c *HPIgPostClient) QueryBlobs(hip *HPIgPost) *HPBlobQuery
QueryBlobs queries the blobs edge of a HPIgPost.
func (c *HPIgPostClient) QueryOwnerArtist(hip *HPIgPost) *HPArtistQuery
QueryOwnerArtist queries the owner_artist edge of a HPIgPost.
func (c *HPIgPostClient) QueryOwnerMember(hip *HPIgPost) *HPMemberQuery
QueryOwnerMember queries the owner_member edge of a HPIgPost.
func (c *HPIgPostClient) QueryTaggedArtists(hip *HPIgPost) *HPArtistQuery
QueryTaggedArtists queries the tagged_artists edge of a HPIgPost.
func (c *HPIgPostClient) QueryTaggedMembers(hip *HPIgPost) *HPMemberQuery
QueryTaggedMembers queries the tagged_members edge of a HPIgPost.
func (c *HPIgPostClient) Update() *HPIgPostUpdate
Update returns an update builder for HPIgPost.
func (c *HPIgPostClient) UpdateOne(hip *HPIgPost) *HPIgPostUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *HPIgPostClient) UpdateOneID(id int) *HPIgPostUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *HPIgPostClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hpigpost.Hooks(f(g(h())))`.
HPIgPostConnection is the connection containing edges to HPIgPost.
type HPIgPostConnection struct {
Edges []*HPIgPostEdge `json:"edges"`
PageInfo PageInfo `json:"pageInfo"`
TotalCount int `json:"totalCount"`
}
HPIgPostCreate is the builder for creating a HPIgPost entity.
type HPIgPostCreate struct {
// contains filtered or unexported fields
}
func (hipc *HPIgPostCreate) AddBlobIDs(ids ...int) *HPIgPostCreate
AddBlobIDs adds the "blobs" edge to the HPBlob entity by IDs.
func (hipc *HPIgPostCreate) AddBlobs(h ...*HPBlob) *HPIgPostCreate
AddBlobs adds the "blobs" edges to the HPBlob entity.
func (hipc *HPIgPostCreate) AddTaggedArtistIDs(ids ...int) *HPIgPostCreate
AddTaggedArtistIDs adds the "tagged_artists" edge to the HPArtist entity by IDs.
func (hipc *HPIgPostCreate) AddTaggedArtists(h ...*HPArtist) *HPIgPostCreate
AddTaggedArtists adds the "tagged_artists" edges to the HPArtist entity.
func (hipc *HPIgPostCreate) AddTaggedMemberIDs(ids ...int) *HPIgPostCreate
AddTaggedMemberIDs adds the "tagged_members" edge to the HPMember entity by IDs.
func (hipc *HPIgPostCreate) AddTaggedMembers(h ...*HPMember) *HPIgPostCreate
AddTaggedMembers adds the "tagged_members" edges to the HPMember entity.
func (hipc *HPIgPostCreate) Exec(ctx context.Context) error
Exec executes the query.
func (hipc *HPIgPostCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hipc *HPIgPostCreate) Mutation() *HPIgPostMutation
Mutation returns the HPIgPostMutation object of the builder.
func (hipc *HPIgPostCreate) OnConflict(opts ...sql.ConflictOption) *HPIgPostUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPIgPost.Create().
SetCrawledAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPIgPostUpsert) {
SetCrawledAt(v+v).
}).
Exec(ctx)
func (hipc *HPIgPostCreate) OnConflictColumns(columns ...string) *HPIgPostUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPIgPost.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hipc *HPIgPostCreate) Save(ctx context.Context) (*HPIgPost, error)
Save creates the HPIgPost in the database.
func (hipc *HPIgPostCreate) SaveX(ctx context.Context) *HPIgPost
SaveX calls Save and panics if Save returns an error.
func (hipc *HPIgPostCreate) SetAsset(h *HPAsset) *HPIgPostCreate
SetAsset sets the "asset" edge to the HPAsset entity.
func (hipc *HPIgPostCreate) SetAssetID(id int) *HPIgPostCreate
SetAssetID sets the "asset" edge to the HPAsset entity by ID.
func (hipc *HPIgPostCreate) SetComments(i int) *HPIgPostCreate
SetComments sets the "comments" field.
func (hipc *HPIgPostCreate) SetCrawledAt(t time.Time) *HPIgPostCreate
SetCrawledAt sets the "crawled_at" field.
func (hipc *HPIgPostCreate) SetCreatedAt(t time.Time) *HPIgPostCreate
SetCreatedAt sets the "created_at" field.
func (hipc *HPIgPostCreate) SetDescription(s string) *HPIgPostCreate
SetDescription sets the "description" field.
func (hipc *HPIgPostCreate) SetErrorCount(i int) *HPIgPostCreate
SetErrorCount sets the "error_count" field.
func (hipc *HPIgPostCreate) SetLastErrorMessage(s string) *HPIgPostCreate
SetLastErrorMessage sets the "last_error_message" field.
func (hipc *HPIgPostCreate) SetLikes(i int) *HPIgPostCreate
SetLikes sets the "likes" field.
func (hipc *HPIgPostCreate) SetManuallyModified(jm *jsonfields.ManuallyModified) *HPIgPostCreate
SetManuallyModified sets the "manually_modified" field.
func (hipc *HPIgPostCreate) SetMedia(j []jsonfields.Media) *HPIgPostCreate
SetMedia sets the "media" field.
func (hipc *HPIgPostCreate) SetNillableAssetID(id *int) *HPIgPostCreate
SetNillableAssetID sets the "asset" edge to the HPAsset entity by ID if the given value is not nil.
func (hipc *HPIgPostCreate) SetNillableCrawledAt(t *time.Time) *HPIgPostCreate
SetNillableCrawledAt sets the "crawled_at" field if the given value is not nil.
func (hipc *HPIgPostCreate) SetNillableCreatedAt(t *time.Time) *HPIgPostCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (hipc *HPIgPostCreate) SetNillableErrorCount(i *int) *HPIgPostCreate
SetNillableErrorCount sets the "error_count" field if the given value is not nil.
func (hipc *HPIgPostCreate) SetNillableLastErrorMessage(s *string) *HPIgPostCreate
SetNillableLastErrorMessage sets the "last_error_message" field if the given value is not nil.
func (hipc *HPIgPostCreate) SetNillableOwnerArtistID(i *int) *HPIgPostCreate
SetNillableOwnerArtistID sets the "owner_artist_id" field if the given value is not nil.
func (hipc *HPIgPostCreate) SetNillableOwnerMemberID(i *int) *HPIgPostCreate
SetNillableOwnerMemberID sets the "owner_member_id" field if the given value is not nil.
func (hipc *HPIgPostCreate) SetNillableRecrawlRequired(b *bool) *HPIgPostCreate
SetNillableRecrawlRequired sets the "recrawl_required" field if the given value is not nil.
func (hipc *HPIgPostCreate) SetNillableUpdatedAt(t *time.Time) *HPIgPostCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hipc *HPIgPostCreate) SetOwnerArtist(h *HPArtist) *HPIgPostCreate
SetOwnerArtist sets the "owner_artist" edge to the HPArtist entity.
func (hipc *HPIgPostCreate) SetOwnerArtistID(i int) *HPIgPostCreate
SetOwnerArtistID sets the "owner_artist_id" field.
func (hipc *HPIgPostCreate) SetOwnerMember(h *HPMember) *HPIgPostCreate
SetOwnerMember sets the "owner_member" edge to the HPMember entity.
func (hipc *HPIgPostCreate) SetOwnerMemberID(i int) *HPIgPostCreate
SetOwnerMemberID sets the "owner_member_id" field.
func (hipc *HPIgPostCreate) SetPostAt(t time.Time) *HPIgPostCreate
SetPostAt sets the "post_at" field.
func (hipc *HPIgPostCreate) SetRecrawlArgs(jica *jsonfields.HPIgCrawlArgs) *HPIgPostCreate
SetRecrawlArgs sets the "recrawl_args" field.
func (hipc *HPIgPostCreate) SetRecrawlRequired(b bool) *HPIgPostCreate
SetRecrawlRequired sets the "recrawl_required" field.
func (hipc *HPIgPostCreate) SetShortcode(s string) *HPIgPostCreate
SetShortcode sets the "shortcode" field.
func (hipc *HPIgPostCreate) SetUpdatedAt(t time.Time) *HPIgPostCreate
SetUpdatedAt sets the "updated_at" field.
HPIgPostCreateBulk is the builder for creating many HPIgPost entities in bulk.
type HPIgPostCreateBulk struct {
// contains filtered or unexported fields
}
func (hipcb *HPIgPostCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (hipcb *HPIgPostCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hipcb *HPIgPostCreateBulk) OnConflict(opts ...sql.ConflictOption) *HPIgPostUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPIgPost.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPIgPostUpsert) {
SetCrawledAt(v+v).
}).
Exec(ctx)
func (hipcb *HPIgPostCreateBulk) OnConflictColumns(columns ...string) *HPIgPostUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPIgPost.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hipcb *HPIgPostCreateBulk) Save(ctx context.Context) ([]*HPIgPost, error)
Save creates the HPIgPost entities in the database.
func (hipcb *HPIgPostCreateBulk) SaveX(ctx context.Context) []*HPIgPost
SaveX is like Save, but panics if an error occurs.
HPIgPostDelete is the builder for deleting a HPIgPost entity.
type HPIgPostDelete struct {
// contains filtered or unexported fields
}
func (hipd *HPIgPostDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (hipd *HPIgPostDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (hipd *HPIgPostDelete) Where(ps ...predicate.HPIgPost) *HPIgPostDelete
Where appends a list predicates to the HPIgPostDelete builder.
HPIgPostDeleteOne is the builder for deleting a single HPIgPost entity.
type HPIgPostDeleteOne struct {
// contains filtered or unexported fields
}
func (hipdo *HPIgPostDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (hipdo *HPIgPostDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hipdo *HPIgPostDeleteOne) Where(ps ...predicate.HPIgPost) *HPIgPostDeleteOne
Where appends a list predicates to the HPIgPostDelete builder.
HPIgPostEdge is the edge representation of HPIgPost.
type HPIgPostEdge struct {
Node *HPIgPost `json:"node"`
Cursor Cursor `json:"cursor"`
}
HPIgPostEdges holds the relations/edges for other nodes in the graph.
type HPIgPostEdges struct {
// OwnerArtist holds the value of the owner_artist edge.
OwnerArtist *HPArtist `json:"owner_artist,omitempty"`
// OwnerMember holds the value of the owner_member edge.
OwnerMember *HPMember `json:"owner_member,omitempty"`
// Asset holds the value of the asset edge.
Asset *HPAsset `json:"asset,omitempty"`
// TaggedArtists holds the value of the tagged_artists edge.
TaggedArtists []*HPArtist `json:"tagged_artists,omitempty"`
// TaggedMembers holds the value of the tagged_members edge.
TaggedMembers []*HPMember `json:"tagged_members,omitempty"`
// Blobs holds the value of the blobs edge.
Blobs []*HPBlob `json:"blobs,omitempty"`
// contains filtered or unexported fields
}
func (e HPIgPostEdges) AssetOrErr() (*HPAsset, error)
AssetOrErr returns the Asset value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (e HPIgPostEdges) BlobsOrErr() ([]*HPBlob, error)
BlobsOrErr returns the Blobs value or an error if the edge was not loaded in eager-loading.
func (e HPIgPostEdges) OwnerArtistOrErr() (*HPArtist, error)
OwnerArtistOrErr returns the OwnerArtist value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (e HPIgPostEdges) OwnerMemberOrErr() (*HPMember, error)
OwnerMemberOrErr returns the OwnerMember value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (e HPIgPostEdges) TaggedArtistsOrErr() ([]*HPArtist, error)
TaggedArtistsOrErr returns the TaggedArtists value or an error if the edge was not loaded in eager-loading.
func (e HPIgPostEdges) TaggedMembersOrErr() ([]*HPMember, error)
TaggedMembersOrErr returns the TaggedMembers value or an error if the edge was not loaded in eager-loading.
HPIgPostFilter provides a generic filtering capability at runtime for HPIgPostQuery.
type HPIgPostFilter struct {
// contains filtered or unexported fields
}
func (f *HPIgPostFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *HPIgPostFilter) WhereComments(p entql.IntP)
WhereComments applies the entql int predicate on the comments field.
func (f *HPIgPostFilter) WhereCrawledAt(p entql.TimeP)
WhereCrawledAt applies the entql time.Time predicate on the crawled_at field.
func (f *HPIgPostFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (f *HPIgPostFilter) WhereDescription(p entql.StringP)
WhereDescription applies the entql string predicate on the description field.
func (f *HPIgPostFilter) WhereErrorCount(p entql.IntP)
WhereErrorCount applies the entql int predicate on the error_count field.
func (f *HPIgPostFilter) WhereHasAsset()
WhereHasAsset applies a predicate to check if query has an edge asset.
func (f *HPIgPostFilter) WhereHasAssetWith(preds ...predicate.HPAsset)
WhereHasAssetWith applies a predicate to check if query has an edge asset with a given conditions (other predicates).
func (f *HPIgPostFilter) WhereHasBlobs()
WhereHasBlobs applies a predicate to check if query has an edge blobs.
func (f *HPIgPostFilter) WhereHasBlobsWith(preds ...predicate.HPBlob)
WhereHasBlobsWith applies a predicate to check if query has an edge blobs with a given conditions (other predicates).
func (f *HPIgPostFilter) WhereHasOwnerArtist()
WhereHasOwnerArtist applies a predicate to check if query has an edge owner_artist.
func (f *HPIgPostFilter) WhereHasOwnerArtistWith(preds ...predicate.HPArtist)
WhereHasOwnerArtistWith applies a predicate to check if query has an edge owner_artist with a given conditions (other predicates).
func (f *HPIgPostFilter) WhereHasOwnerMember()
WhereHasOwnerMember applies a predicate to check if query has an edge owner_member.
func (f *HPIgPostFilter) WhereHasOwnerMemberWith(preds ...predicate.HPMember)
WhereHasOwnerMemberWith applies a predicate to check if query has an edge owner_member with a given conditions (other predicates).
func (f *HPIgPostFilter) WhereHasTaggedArtists()
WhereHasTaggedArtists applies a predicate to check if query has an edge tagged_artists.
func (f *HPIgPostFilter) WhereHasTaggedArtistsWith(preds ...predicate.HPArtist)
WhereHasTaggedArtistsWith applies a predicate to check if query has an edge tagged_artists with a given conditions (other predicates).
func (f *HPIgPostFilter) WhereHasTaggedMembers()
WhereHasTaggedMembers applies a predicate to check if query has an edge tagged_members.
func (f *HPIgPostFilter) WhereHasTaggedMembersWith(preds ...predicate.HPMember)
WhereHasTaggedMembersWith applies a predicate to check if query has an edge tagged_members with a given conditions (other predicates).
func (f *HPIgPostFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *HPIgPostFilter) WhereLastErrorMessage(p entql.StringP)
WhereLastErrorMessage applies the entql string predicate on the last_error_message field.
func (f *HPIgPostFilter) WhereLikes(p entql.IntP)
WhereLikes applies the entql int predicate on the likes field.
func (f *HPIgPostFilter) WhereManuallyModified(p entql.BytesP)
WhereManuallyModified applies the entql json.RawMessage predicate on the manually_modified field.
func (f *HPIgPostFilter) WhereMedia(p entql.BytesP)
WhereMedia applies the entql json.RawMessage predicate on the media field.
func (f *HPIgPostFilter) WhereOwnerArtistID(p entql.IntP)
WhereOwnerArtistID applies the entql int predicate on the owner_artist_id field.
func (f *HPIgPostFilter) WhereOwnerMemberID(p entql.IntP)
WhereOwnerMemberID applies the entql int predicate on the owner_member_id field.
func (f *HPIgPostFilter) WherePostAt(p entql.TimeP)
WherePostAt applies the entql time.Time predicate on the post_at field.
func (f *HPIgPostFilter) WhereRecrawlArgs(p entql.BytesP)
WhereRecrawlArgs applies the entql json.RawMessage predicate on the recrawl_args field.
func (f *HPIgPostFilter) WhereRecrawlRequired(p entql.BoolP)
WhereRecrawlRequired applies the entql bool predicate on the recrawl_required field.
func (f *HPIgPostFilter) WhereShortcode(p entql.StringP)
WhereShortcode applies the entql string predicate on the shortcode field.
func (f *HPIgPostFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
HPIgPostGroupBy is the group-by builder for HPIgPost entities.
type HPIgPostGroupBy struct {
// contains filtered or unexported fields
}
func (hipgb *HPIgPostGroupBy) Aggregate(fns ...AggregateFunc) *HPIgPostGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *HPIgPostGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPIgPostGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPIgPostGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPIgPostGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPIgPostGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPIgPostGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPIgPostGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPIgPostGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPIgPostGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPIgPostGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPIgPostGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPIgPostGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hipgb *HPIgPostGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPIgPostGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPIgPostGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPIgPostGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPIgPostGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPIgPostGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPIgPostMutation represents an operation that mutates the HPIgPost nodes in the graph.
type HPIgPostMutation struct {
// contains filtered or unexported fields
}
func (m *HPIgPostMutation) AddBlobIDs(ids ...int)
AddBlobIDs adds the "blobs" edge to the HPBlob entity by ids.
func (m *HPIgPostMutation) AddComments(i int)
AddComments adds i to the "comments" field.
func (m *HPIgPostMutation) AddErrorCount(i int)
AddErrorCount adds i to the "error_count" field.
func (m *HPIgPostMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPIgPostMutation) AddLikes(i int)
AddLikes adds i to the "likes" field.
func (m *HPIgPostMutation) AddTaggedArtistIDs(ids ...int)
AddTaggedArtistIDs adds the "tagged_artists" edge to the HPArtist entity by ids.
func (m *HPIgPostMutation) AddTaggedMemberIDs(ids ...int)
AddTaggedMemberIDs adds the "tagged_members" edge to the HPMember entity by ids.
func (m *HPIgPostMutation) AddedComments() (r int, exists bool)
AddedComments returns the value that was added to the "comments" field in this mutation.
func (m *HPIgPostMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *HPIgPostMutation) AddedErrorCount() (r int, exists bool)
AddedErrorCount returns the value that was added to the "error_count" field in this mutation.
func (m *HPIgPostMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPIgPostMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *HPIgPostMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *HPIgPostMutation) AddedLikes() (r int, exists bool)
AddedLikes returns the value that was added to the "likes" field in this mutation.
func (m *HPIgPostMutation) AppendMedia(j []jsonfields.Media)
AppendMedia adds j to the "media" field.
func (m *HPIgPostMutation) AppendedMedia() ([]jsonfields.Media, bool)
AppendedMedia returns the list of values that were appended to the "media" field in this mutation.
func (m *HPIgPostMutation) AssetCleared() bool
AssetCleared reports if the "asset" edge to the HPAsset entity was cleared.
func (m *HPIgPostMutation) AssetID() (id int, exists bool)
AssetID returns the "asset" edge ID in the mutation.
func (m *HPIgPostMutation) AssetIDs() (ids []int)
AssetIDs returns the "asset" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AssetID instead. It exists only for internal usage by the builders.
func (m *HPIgPostMutation) BlobsCleared() bool
BlobsCleared reports if the "blobs" edge to the HPBlob entity was cleared.
func (m *HPIgPostMutation) BlobsIDs() (ids []int)
BlobsIDs returns the "blobs" edge IDs in the mutation.
func (m *HPIgPostMutation) ClearAsset()
ClearAsset clears the "asset" edge to the HPAsset entity.
func (m *HPIgPostMutation) ClearBlobs()
ClearBlobs clears the "blobs" edge to the HPBlob entity.
func (m *HPIgPostMutation) ClearCrawledAt()
ClearCrawledAt clears the value of the "crawled_at" field.
func (m *HPIgPostMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (m *HPIgPostMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *HPIgPostMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPIgPostMutation) ClearLastErrorMessage()
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (m *HPIgPostMutation) ClearManuallyModified()
ClearManuallyModified clears the value of the "manually_modified" field.
func (m *HPIgPostMutation) ClearOwnerArtist()
ClearOwnerArtist clears the "owner_artist" edge to the HPArtist entity.
func (m *HPIgPostMutation) ClearOwnerArtistID()
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (m *HPIgPostMutation) ClearOwnerMember()
ClearOwnerMember clears the "owner_member" edge to the HPMember entity.
func (m *HPIgPostMutation) ClearOwnerMemberID()
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (m *HPIgPostMutation) ClearRecrawlArgs()
ClearRecrawlArgs clears the value of the "recrawl_args" field.
func (m *HPIgPostMutation) ClearRecrawlRequired()
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (m *HPIgPostMutation) ClearTaggedArtists()
ClearTaggedArtists clears the "tagged_artists" edge to the HPArtist entity.
func (m *HPIgPostMutation) ClearTaggedMembers()
ClearTaggedMembers clears the "tagged_members" edge to the HPMember entity.
func (m *HPIgPostMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (m *HPIgPostMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *HPIgPostMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m HPIgPostMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *HPIgPostMutation) Comments() (r int, exists bool)
Comments returns the value of the "comments" field in the mutation.
func (m *HPIgPostMutation) CrawledAt() (r time.Time, exists bool)
CrawledAt returns the value of the "crawled_at" field in the mutation.
func (m *HPIgPostMutation) CrawledAtCleared() bool
CrawledAtCleared returns if the "crawled_at" field was cleared in this mutation.
func (m *HPIgPostMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (m *HPIgPostMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (m *HPIgPostMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (m *HPIgPostMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *HPIgPostMutation) ErrorCount() (r int, exists bool)
ErrorCount returns the value of the "error_count" field in the mutation.
func (m *HPIgPostMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPIgPostMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *HPIgPostMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *HPIgPostMutation) Filter() *HPIgPostFilter
Filter returns an entql.Where implementation to apply filters on the HPIgPostMutation builder.
func (m *HPIgPostMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *HPIgPostMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *HPIgPostMutation) LastErrorMessage() (r string, exists bool)
LastErrorMessage returns the value of the "last_error_message" field in the mutation.
func (m *HPIgPostMutation) LastErrorMessageCleared() bool
LastErrorMessageCleared returns if the "last_error_message" field was cleared in this mutation.
func (m *HPIgPostMutation) Likes() (r int, exists bool)
Likes returns the value of the "likes" field in the mutation.
func (m *HPIgPostMutation) ManuallyModified() (r *jsonfields.ManuallyModified, exists bool)
ManuallyModified returns the value of the "manually_modified" field in the mutation.
func (m *HPIgPostMutation) ManuallyModifiedCleared() bool
ManuallyModifiedCleared returns if the "manually_modified" field was cleared in this mutation.
func (m *HPIgPostMutation) Media() (r []jsonfields.Media, exists bool)
Media returns the value of the "media" field in the mutation.
func (m *HPIgPostMutation) OldComments(ctx context.Context) (v int, err error)
OldComments returns the old "comments" field's value of the HPIgPost entity. If the HPIgPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPIgPostMutation) OldCrawledAt(ctx context.Context) (v *time.Time, err error)
OldCrawledAt returns the old "crawled_at" field's value of the HPIgPost entity. If the HPIgPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPIgPostMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
OldCreatedAt returns the old "created_at" field's value of the HPIgPost entity. If the HPIgPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPIgPostMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the HPIgPost entity. If the HPIgPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPIgPostMutation) OldErrorCount(ctx context.Context) (v int, err error)
OldErrorCount returns the old "error_count" field's value of the HPIgPost entity. If the HPIgPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPIgPostMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *HPIgPostMutation) OldLastErrorMessage(ctx context.Context) (v *string, err error)
OldLastErrorMessage returns the old "last_error_message" field's value of the HPIgPost entity. If the HPIgPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPIgPostMutation) OldLikes(ctx context.Context) (v int, err error)
OldLikes returns the old "likes" field's value of the HPIgPost entity. If the HPIgPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPIgPostMutation) OldManuallyModified(ctx context.Context) (v *jsonfields.ManuallyModified, err error)
OldManuallyModified returns the old "manually_modified" field's value of the HPIgPost entity. If the HPIgPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPIgPostMutation) OldMedia(ctx context.Context) (v []jsonfields.Media, err error)
OldMedia returns the old "media" field's value of the HPIgPost entity. If the HPIgPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPIgPostMutation) OldOwnerArtistID(ctx context.Context) (v *int, err error)
OldOwnerArtistID returns the old "owner_artist_id" field's value of the HPIgPost entity. If the HPIgPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPIgPostMutation) OldOwnerMemberID(ctx context.Context) (v *int, err error)
OldOwnerMemberID returns the old "owner_member_id" field's value of the HPIgPost entity. If the HPIgPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPIgPostMutation) OldPostAt(ctx context.Context) (v time.Time, err error)
OldPostAt returns the old "post_at" field's value of the HPIgPost entity. If the HPIgPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPIgPostMutation) OldRecrawlArgs(ctx context.Context) (v *jsonfields.HPIgCrawlArgs, err error)
OldRecrawlArgs returns the old "recrawl_args" field's value of the HPIgPost entity. If the HPIgPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPIgPostMutation) OldRecrawlRequired(ctx context.Context) (v bool, err error)
OldRecrawlRequired returns the old "recrawl_required" field's value of the HPIgPost entity. If the HPIgPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPIgPostMutation) OldShortcode(ctx context.Context) (v string, err error)
OldShortcode returns the old "shortcode" field's value of the HPIgPost entity. If the HPIgPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPIgPostMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
OldUpdatedAt returns the old "updated_at" field's value of the HPIgPost entity. If the HPIgPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPIgPostMutation) Op() Op
Op returns the operation name.
func (m *HPIgPostMutation) OwnerArtistCleared() bool
OwnerArtistCleared reports if the "owner_artist" edge to the HPArtist entity was cleared.
func (m *HPIgPostMutation) OwnerArtistID() (r int, exists bool)
OwnerArtistID returns the value of the "owner_artist_id" field in the mutation.
func (m *HPIgPostMutation) OwnerArtistIDCleared() bool
OwnerArtistIDCleared returns if the "owner_artist_id" field was cleared in this mutation.
func (m *HPIgPostMutation) OwnerArtistIDs() (ids []int)
OwnerArtistIDs returns the "owner_artist" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerArtistID instead. It exists only for internal usage by the builders.
func (m *HPIgPostMutation) OwnerMemberCleared() bool
OwnerMemberCleared reports if the "owner_member" edge to the HPMember entity was cleared.
func (m *HPIgPostMutation) OwnerMemberID() (r int, exists bool)
OwnerMemberID returns the value of the "owner_member_id" field in the mutation.
func (m *HPIgPostMutation) OwnerMemberIDCleared() bool
OwnerMemberIDCleared returns if the "owner_member_id" field was cleared in this mutation.
func (m *HPIgPostMutation) OwnerMemberIDs() (ids []int)
OwnerMemberIDs returns the "owner_member" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerMemberID instead. It exists only for internal usage by the builders.
func (m *HPIgPostMutation) PostAt() (r time.Time, exists bool)
PostAt returns the value of the "post_at" field in the mutation.
func (m *HPIgPostMutation) RecrawlArgs() (r *jsonfields.HPIgCrawlArgs, exists bool)
RecrawlArgs returns the value of the "recrawl_args" field in the mutation.
func (m *HPIgPostMutation) RecrawlArgsCleared() bool
RecrawlArgsCleared returns if the "recrawl_args" field was cleared in this mutation.
func (m *HPIgPostMutation) RecrawlRequired() (r bool, exists bool)
RecrawlRequired returns the value of the "recrawl_required" field in the mutation.
func (m *HPIgPostMutation) RecrawlRequiredCleared() bool
RecrawlRequiredCleared returns if the "recrawl_required" field was cleared in this mutation.
func (m *HPIgPostMutation) RemoveBlobIDs(ids ...int)
RemoveBlobIDs removes the "blobs" edge to the HPBlob entity by IDs.
func (m *HPIgPostMutation) RemoveTaggedArtistIDs(ids ...int)
RemoveTaggedArtistIDs removes the "tagged_artists" edge to the HPArtist entity by IDs.
func (m *HPIgPostMutation) RemoveTaggedMemberIDs(ids ...int)
RemoveTaggedMemberIDs removes the "tagged_members" edge to the HPMember entity by IDs.
func (m *HPIgPostMutation) RemovedBlobsIDs() (ids []int)
RemovedBlobs returns the removed IDs of the "blobs" edge to the HPBlob entity.
func (m *HPIgPostMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *HPIgPostMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *HPIgPostMutation) RemovedTaggedArtistsIDs() (ids []int)
RemovedTaggedArtists returns the removed IDs of the "tagged_artists" edge to the HPArtist entity.
func (m *HPIgPostMutation) RemovedTaggedMembersIDs() (ids []int)
RemovedTaggedMembers returns the removed IDs of the "tagged_members" edge to the HPMember entity.
func (m *HPIgPostMutation) ResetAsset()
ResetAsset resets all changes to the "asset" edge.
func (m *HPIgPostMutation) ResetBlobs()
ResetBlobs resets all changes to the "blobs" edge.
func (m *HPIgPostMutation) ResetComments()
ResetComments resets all changes to the "comments" field.
func (m *HPIgPostMutation) ResetCrawledAt()
ResetCrawledAt resets all changes to the "crawled_at" field.
func (m *HPIgPostMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (m *HPIgPostMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (m *HPIgPostMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *HPIgPostMutation) ResetErrorCount()
ResetErrorCount resets all changes to the "error_count" field.
func (m *HPIgPostMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPIgPostMutation) ResetLastErrorMessage()
ResetLastErrorMessage resets all changes to the "last_error_message" field.
func (m *HPIgPostMutation) ResetLikes()
ResetLikes resets all changes to the "likes" field.
func (m *HPIgPostMutation) ResetManuallyModified()
ResetManuallyModified resets all changes to the "manually_modified" field.
func (m *HPIgPostMutation) ResetMedia()
ResetMedia resets all changes to the "media" field.
func (m *HPIgPostMutation) ResetOwnerArtist()
ResetOwnerArtist resets all changes to the "owner_artist" edge.
func (m *HPIgPostMutation) ResetOwnerArtistID()
ResetOwnerArtistID resets all changes to the "owner_artist_id" field.
func (m *HPIgPostMutation) ResetOwnerMember()
ResetOwnerMember resets all changes to the "owner_member" edge.
func (m *HPIgPostMutation) ResetOwnerMemberID()
ResetOwnerMemberID resets all changes to the "owner_member_id" field.
func (m *HPIgPostMutation) ResetPostAt()
ResetPostAt resets all changes to the "post_at" field.
func (m *HPIgPostMutation) ResetRecrawlArgs()
ResetRecrawlArgs resets all changes to the "recrawl_args" field.
func (m *HPIgPostMutation) ResetRecrawlRequired()
ResetRecrawlRequired resets all changes to the "recrawl_required" field.
func (m *HPIgPostMutation) ResetShortcode()
ResetShortcode resets all changes to the "shortcode" field.
func (m *HPIgPostMutation) ResetTaggedArtists()
ResetTaggedArtists resets all changes to the "tagged_artists" edge.
func (m *HPIgPostMutation) ResetTaggedMembers()
ResetTaggedMembers resets all changes to the "tagged_members" edge.
func (m *HPIgPostMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (m *HPIgPostMutation) SetAssetID(id int)
SetAssetID sets the "asset" edge to the HPAsset entity by id.
func (m *HPIgPostMutation) SetComments(i int)
SetComments sets the "comments" field.
func (m *HPIgPostMutation) SetCrawledAt(t time.Time)
SetCrawledAt sets the "crawled_at" field.
func (m *HPIgPostMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (m *HPIgPostMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (m *HPIgPostMutation) SetErrorCount(i int)
SetErrorCount sets the "error_count" field.
func (m *HPIgPostMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPIgPostMutation) SetLastErrorMessage(s string)
SetLastErrorMessage sets the "last_error_message" field.
func (m *HPIgPostMutation) SetLikes(i int)
SetLikes sets the "likes" field.
func (m *HPIgPostMutation) SetManuallyModified(jm *jsonfields.ManuallyModified)
SetManuallyModified sets the "manually_modified" field.
func (m *HPIgPostMutation) SetMedia(j []jsonfields.Media)
SetMedia sets the "media" field.
func (m *HPIgPostMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *HPIgPostMutation) SetOwnerArtistID(i int)
SetOwnerArtistID sets the "owner_artist_id" field.
func (m *HPIgPostMutation) SetOwnerMemberID(i int)
SetOwnerMemberID sets the "owner_member_id" field.
func (m *HPIgPostMutation) SetPostAt(t time.Time)
SetPostAt sets the "post_at" field.
func (m *HPIgPostMutation) SetRecrawlArgs(jica *jsonfields.HPIgCrawlArgs)
SetRecrawlArgs sets the "recrawl_args" field.
func (m *HPIgPostMutation) SetRecrawlRequired(b bool)
SetRecrawlRequired sets the "recrawl_required" field.
func (m *HPIgPostMutation) SetShortcode(s string)
SetShortcode sets the "shortcode" field.
func (m *HPIgPostMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (m *HPIgPostMutation) Shortcode() (r string, exists bool)
Shortcode returns the value of the "shortcode" field in the mutation.
func (m *HPIgPostMutation) TaggedArtistsCleared() bool
TaggedArtistsCleared reports if the "tagged_artists" edge to the HPArtist entity was cleared.
func (m *HPIgPostMutation) TaggedArtistsIDs() (ids []int)
TaggedArtistsIDs returns the "tagged_artists" edge IDs in the mutation.
func (m *HPIgPostMutation) TaggedMembersCleared() bool
TaggedMembersCleared reports if the "tagged_members" edge to the HPMember entity was cleared.
func (m *HPIgPostMutation) TaggedMembersIDs() (ids []int)
TaggedMembersIDs returns the "tagged_members" edge IDs in the mutation.
func (m HPIgPostMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *HPIgPostMutation) Type() string
Type returns the node type of this mutation (HPIgPost).
func (m *HPIgPostMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (m *HPIgPostMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (m *HPIgPostMutation) Where(ps ...predicate.HPIgPost)
Where appends a list predicates to the HPIgPostMutation builder.
func (m *HPIgPostMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HPIgPostMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
HPIgPostOrder defines the ordering of HPIgPost.
type HPIgPostOrder struct {
Direction OrderDirection `json:"direction"`
Field *HPIgPostOrderField `json:"field"`
}
HPIgPostOrderField defines the ordering field of HPIgPost.
type HPIgPostOrderField struct {
// contains filtered or unexported fields
}
HPIgPostPaginateOption enables pagination customization.
type HPIgPostPaginateOption func(*hpigpostPager) error
func WithHPIgPostFilter(filter func(*HPIgPostQuery) (*HPIgPostQuery, error)) HPIgPostPaginateOption
WithHPIgPostFilter configures pagination filter.
func WithHPIgPostOrder(order *HPIgPostOrder) HPIgPostPaginateOption
WithHPIgPostOrder configures pagination ordering.
HPIgPostQuery is the builder for querying HPIgPost entities.
type HPIgPostQuery struct {
// contains filtered or unexported fields
}
func (hipq *HPIgPostQuery) Aggregate(fns ...AggregateFunc) *HPIgPostSelect
Aggregate returns a HPIgPostSelect configured with the given aggregations.
func (hipq *HPIgPostQuery) All(ctx context.Context) ([]*HPIgPost, error)
All executes the query and returns a list of HPIgPosts.
func (hipq *HPIgPostQuery) AllX(ctx context.Context) []*HPIgPost
AllX is like All, but panics if an error occurs.
func (hipq *HPIgPostQuery) Clone() *HPIgPostQuery
Clone returns a duplicate of the HPIgPostQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (hip *HPIgPostQuery) CollectFields(ctx context.Context, satisfies ...string) (*HPIgPostQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (hipq *HPIgPostQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (hipq *HPIgPostQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (hipq *HPIgPostQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (hipq *HPIgPostQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (hipq *HPIgPostQuery) Filter() *HPIgPostFilter
Filter returns a Filter implementation to apply filters on the HPIgPostQuery builder.
func (hipq *HPIgPostQuery) First(ctx context.Context) (*HPIgPost, error)
First returns the first HPIgPost entity from the query. Returns a *NotFoundError when no HPIgPost was found.
func (hipq *HPIgPostQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first HPIgPost ID from the query. Returns a *NotFoundError when no HPIgPost ID was found.
func (hipq *HPIgPostQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (hipq *HPIgPostQuery) FirstX(ctx context.Context) *HPIgPost
FirstX is like First, but panics if an error occurs.
func (hipq *HPIgPostQuery) GroupBy(field string, fields ...string) *HPIgPostGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CrawledAt time.Time `json:"crawled_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.HPIgPost.Query().
GroupBy(hpigpost.FieldCrawledAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (hipq *HPIgPostQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of HPIgPost IDs.
func (hipq *HPIgPostQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (hipq *HPIgPostQuery) Limit(limit int) *HPIgPostQuery
Limit the number of records to be returned by this query.
func (hipq *HPIgPostQuery) Offset(offset int) *HPIgPostQuery
Offset to start from.
func (hipq *HPIgPostQuery) Only(ctx context.Context) (*HPIgPost, error)
Only returns a single HPIgPost entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HPIgPost entity is found. Returns a *NotFoundError when no HPIgPost entities are found.
func (hipq *HPIgPostQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only HPIgPost ID in the query. Returns a *NotSingularError when more than one HPIgPost ID is found. Returns a *NotFoundError when no entities are found.
func (hipq *HPIgPostQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (hipq *HPIgPostQuery) OnlyX(ctx context.Context) *HPIgPost
OnlyX is like Only, but panics if an error occurs.
func (hipq *HPIgPostQuery) Order(o ...hpigpost.Order) *HPIgPostQuery
Order specifies how the records should be ordered.
func (hip *HPIgPostQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...HPIgPostPaginateOption, ) (*HPIgPostConnection, error)
Paginate executes the query and returns a relay based cursor connection to HPIgPost.
func (hipq *HPIgPostQuery) QueryAsset() *HPAssetQuery
QueryAsset chains the current query on the "asset" edge.
func (hipq *HPIgPostQuery) QueryBlobs() *HPBlobQuery
QueryBlobs chains the current query on the "blobs" edge.
func (hipq *HPIgPostQuery) QueryOwnerArtist() *HPArtistQuery
QueryOwnerArtist chains the current query on the "owner_artist" edge.
func (hipq *HPIgPostQuery) QueryOwnerMember() *HPMemberQuery
QueryOwnerMember chains the current query on the "owner_member" edge.
func (hipq *HPIgPostQuery) QueryTaggedArtists() *HPArtistQuery
QueryTaggedArtists chains the current query on the "tagged_artists" edge.
func (hipq *HPIgPostQuery) QueryTaggedMembers() *HPMemberQuery
QueryTaggedMembers chains the current query on the "tagged_members" edge.
func (hipq *HPIgPostQuery) Select(fields ...string) *HPIgPostSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CrawledAt time.Time `json:"crawled_at,omitempty"`
}
client.HPIgPost.Query().
Select(hpigpost.FieldCrawledAt).
Scan(ctx, &v)
func (hipq *HPIgPostQuery) Unique(unique bool) *HPIgPostQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (hipq *HPIgPostQuery) Where(ps ...predicate.HPIgPost) *HPIgPostQuery
Where adds a new predicate for the HPIgPostQuery builder.
func (hipq *HPIgPostQuery) WithAsset(opts ...func(*HPAssetQuery)) *HPIgPostQuery
WithAsset tells the query-builder to eager-load the nodes that are connected to the "asset" edge. The optional arguments are used to configure the query builder of the edge.
func (hipq *HPIgPostQuery) WithBlobs(opts ...func(*HPBlobQuery)) *HPIgPostQuery
WithBlobs tells the query-builder to eager-load the nodes that are connected to the "blobs" edge. The optional arguments are used to configure the query builder of the edge.
func (hipq *HPIgPostQuery) WithNamedBlobs(name string, opts ...func(*HPBlobQuery)) *HPIgPostQuery
WithNamedBlobs tells the query-builder to eager-load the nodes that are connected to the "blobs" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hipq *HPIgPostQuery) WithNamedTaggedArtists(name string, opts ...func(*HPArtistQuery)) *HPIgPostQuery
WithNamedTaggedArtists tells the query-builder to eager-load the nodes that are connected to the "tagged_artists" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hipq *HPIgPostQuery) WithNamedTaggedMembers(name string, opts ...func(*HPMemberQuery)) *HPIgPostQuery
WithNamedTaggedMembers tells the query-builder to eager-load the nodes that are connected to the "tagged_members" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hipq *HPIgPostQuery) WithOwnerArtist(opts ...func(*HPArtistQuery)) *HPIgPostQuery
WithOwnerArtist tells the query-builder to eager-load the nodes that are connected to the "owner_artist" edge. The optional arguments are used to configure the query builder of the edge.
func (hipq *HPIgPostQuery) WithOwnerMember(opts ...func(*HPMemberQuery)) *HPIgPostQuery
WithOwnerMember tells the query-builder to eager-load the nodes that are connected to the "owner_member" edge. The optional arguments are used to configure the query builder of the edge.
func (hipq *HPIgPostQuery) WithTaggedArtists(opts ...func(*HPArtistQuery)) *HPIgPostQuery
WithTaggedArtists tells the query-builder to eager-load the nodes that are connected to the "tagged_artists" edge. The optional arguments are used to configure the query builder of the edge.
func (hipq *HPIgPostQuery) WithTaggedMembers(opts ...func(*HPMemberQuery)) *HPIgPostQuery
WithTaggedMembers tells the query-builder to eager-load the nodes that are connected to the "tagged_members" edge. The optional arguments are used to configure the query builder of the edge.
HPIgPostSelect is the builder for selecting fields of HPIgPost entities.
type HPIgPostSelect struct {
*HPIgPostQuery
// contains filtered or unexported fields
}
func (hips *HPIgPostSelect) Aggregate(fns ...AggregateFunc) *HPIgPostSelect
Aggregate adds the given aggregation functions to the selector query.
func (s *HPIgPostSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPIgPostSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPIgPostSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPIgPostSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPIgPostSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPIgPostSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPIgPostSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPIgPostSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPIgPostSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPIgPostSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPIgPostSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPIgPostSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hips *HPIgPostSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPIgPostSelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPIgPostSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPIgPostSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPIgPostSelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPIgPostSelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPIgPostUpdate is the builder for updating HPIgPost entities.
type HPIgPostUpdate struct {
// contains filtered or unexported fields
}
func (hipu *HPIgPostUpdate) AddBlobIDs(ids ...int) *HPIgPostUpdate
AddBlobIDs adds the "blobs" edge to the HPBlob entity by IDs.
func (hipu *HPIgPostUpdate) AddBlobs(h ...*HPBlob) *HPIgPostUpdate
AddBlobs adds the "blobs" edges to the HPBlob entity.
func (hipu *HPIgPostUpdate) AddComments(i int) *HPIgPostUpdate
AddComments adds i to the "comments" field.
func (hipu *HPIgPostUpdate) AddErrorCount(i int) *HPIgPostUpdate
AddErrorCount adds i to the "error_count" field.
func (hipu *HPIgPostUpdate) AddLikes(i int) *HPIgPostUpdate
AddLikes adds i to the "likes" field.
func (hipu *HPIgPostUpdate) AddTaggedArtistIDs(ids ...int) *HPIgPostUpdate
AddTaggedArtistIDs adds the "tagged_artists" edge to the HPArtist entity by IDs.
func (hipu *HPIgPostUpdate) AddTaggedArtists(h ...*HPArtist) *HPIgPostUpdate
AddTaggedArtists adds the "tagged_artists" edges to the HPArtist entity.
func (hipu *HPIgPostUpdate) AddTaggedMemberIDs(ids ...int) *HPIgPostUpdate
AddTaggedMemberIDs adds the "tagged_members" edge to the HPMember entity by IDs.
func (hipu *HPIgPostUpdate) AddTaggedMembers(h ...*HPMember) *HPIgPostUpdate
AddTaggedMembers adds the "tagged_members" edges to the HPMember entity.
func (hipu *HPIgPostUpdate) AppendMedia(j []jsonfields.Media) *HPIgPostUpdate
AppendMedia appends j to the "media" field.
func (hipu *HPIgPostUpdate) ClearAsset() *HPIgPostUpdate
ClearAsset clears the "asset" edge to the HPAsset entity.
func (hipu *HPIgPostUpdate) ClearBlobs() *HPIgPostUpdate
ClearBlobs clears all "blobs" edges to the HPBlob entity.
func (hipu *HPIgPostUpdate) ClearCrawledAt() *HPIgPostUpdate
ClearCrawledAt clears the value of the "crawled_at" field.
func (hipu *HPIgPostUpdate) ClearLastErrorMessage() *HPIgPostUpdate
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (hipu *HPIgPostUpdate) ClearManuallyModified() *HPIgPostUpdate
ClearManuallyModified clears the value of the "manually_modified" field.
func (hipu *HPIgPostUpdate) ClearOwnerArtist() *HPIgPostUpdate
ClearOwnerArtist clears the "owner_artist" edge to the HPArtist entity.
func (hipu *HPIgPostUpdate) ClearOwnerArtistID() *HPIgPostUpdate
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (hipu *HPIgPostUpdate) ClearOwnerMember() *HPIgPostUpdate
ClearOwnerMember clears the "owner_member" edge to the HPMember entity.
func (hipu *HPIgPostUpdate) ClearOwnerMemberID() *HPIgPostUpdate
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (hipu *HPIgPostUpdate) ClearRecrawlArgs() *HPIgPostUpdate
ClearRecrawlArgs clears the value of the "recrawl_args" field.
func (hipu *HPIgPostUpdate) ClearRecrawlRequired() *HPIgPostUpdate
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (hipu *HPIgPostUpdate) ClearTaggedArtists() *HPIgPostUpdate
ClearTaggedArtists clears all "tagged_artists" edges to the HPArtist entity.
func (hipu *HPIgPostUpdate) ClearTaggedMembers() *HPIgPostUpdate
ClearTaggedMembers clears all "tagged_members" edges to the HPMember entity.
func (hipu *HPIgPostUpdate) ClearUpdatedAt() *HPIgPostUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (hipu *HPIgPostUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (hipu *HPIgPostUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hipu *HPIgPostUpdate) Mutation() *HPIgPostMutation
Mutation returns the HPIgPostMutation object of the builder.
func (hipu *HPIgPostUpdate) RemoveBlobIDs(ids ...int) *HPIgPostUpdate
RemoveBlobIDs removes the "blobs" edge to HPBlob entities by IDs.
func (hipu *HPIgPostUpdate) RemoveBlobs(h ...*HPBlob) *HPIgPostUpdate
RemoveBlobs removes "blobs" edges to HPBlob entities.
func (hipu *HPIgPostUpdate) RemoveTaggedArtistIDs(ids ...int) *HPIgPostUpdate
RemoveTaggedArtistIDs removes the "tagged_artists" edge to HPArtist entities by IDs.
func (hipu *HPIgPostUpdate) RemoveTaggedArtists(h ...*HPArtist) *HPIgPostUpdate
RemoveTaggedArtists removes "tagged_artists" edges to HPArtist entities.
func (hipu *HPIgPostUpdate) RemoveTaggedMemberIDs(ids ...int) *HPIgPostUpdate
RemoveTaggedMemberIDs removes the "tagged_members" edge to HPMember entities by IDs.
func (hipu *HPIgPostUpdate) RemoveTaggedMembers(h ...*HPMember) *HPIgPostUpdate
RemoveTaggedMembers removes "tagged_members" edges to HPMember entities.
func (hipu *HPIgPostUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (hipu *HPIgPostUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (hipu *HPIgPostUpdate) SetAsset(h *HPAsset) *HPIgPostUpdate
SetAsset sets the "asset" edge to the HPAsset entity.
func (hipu *HPIgPostUpdate) SetAssetID(id int) *HPIgPostUpdate
SetAssetID sets the "asset" edge to the HPAsset entity by ID.
func (hipu *HPIgPostUpdate) SetComments(i int) *HPIgPostUpdate
SetComments sets the "comments" field.
func (hipu *HPIgPostUpdate) SetCrawledAt(t time.Time) *HPIgPostUpdate
SetCrawledAt sets the "crawled_at" field.
func (hipu *HPIgPostUpdate) SetDescription(s string) *HPIgPostUpdate
SetDescription sets the "description" field.
func (hipu *HPIgPostUpdate) SetErrorCount(i int) *HPIgPostUpdate
SetErrorCount sets the "error_count" field.
func (hipu *HPIgPostUpdate) SetLastErrorMessage(s string) *HPIgPostUpdate
SetLastErrorMessage sets the "last_error_message" field.
func (hipu *HPIgPostUpdate) SetLikes(i int) *HPIgPostUpdate
SetLikes sets the "likes" field.
func (hipu *HPIgPostUpdate) SetManuallyModified(jm *jsonfields.ManuallyModified) *HPIgPostUpdate
SetManuallyModified sets the "manually_modified" field.
func (hipu *HPIgPostUpdate) SetMedia(j []jsonfields.Media) *HPIgPostUpdate
SetMedia sets the "media" field.
func (hipu *HPIgPostUpdate) SetNillableAssetID(id *int) *HPIgPostUpdate
SetNillableAssetID sets the "asset" edge to the HPAsset entity by ID if the given value is not nil.
func (hipu *HPIgPostUpdate) SetNillableCrawledAt(t *time.Time) *HPIgPostUpdate
SetNillableCrawledAt sets the "crawled_at" field if the given value is not nil.
func (hipu *HPIgPostUpdate) SetNillableErrorCount(i *int) *HPIgPostUpdate
SetNillableErrorCount sets the "error_count" field if the given value is not nil.
func (hipu *HPIgPostUpdate) SetNillableLastErrorMessage(s *string) *HPIgPostUpdate
SetNillableLastErrorMessage sets the "last_error_message" field if the given value is not nil.
func (hipu *HPIgPostUpdate) SetNillableOwnerArtistID(i *int) *HPIgPostUpdate
SetNillableOwnerArtistID sets the "owner_artist_id" field if the given value is not nil.
func (hipu *HPIgPostUpdate) SetNillableOwnerMemberID(i *int) *HPIgPostUpdate
SetNillableOwnerMemberID sets the "owner_member_id" field if the given value is not nil.
func (hipu *HPIgPostUpdate) SetNillableRecrawlRequired(b *bool) *HPIgPostUpdate
SetNillableRecrawlRequired sets the "recrawl_required" field if the given value is not nil.
func (hipu *HPIgPostUpdate) SetNillableUpdatedAt(t *time.Time) *HPIgPostUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hipu *HPIgPostUpdate) SetOwnerArtist(h *HPArtist) *HPIgPostUpdate
SetOwnerArtist sets the "owner_artist" edge to the HPArtist entity.
func (hipu *HPIgPostUpdate) SetOwnerArtistID(i int) *HPIgPostUpdate
SetOwnerArtistID sets the "owner_artist_id" field.
func (hipu *HPIgPostUpdate) SetOwnerMember(h *HPMember) *HPIgPostUpdate
SetOwnerMember sets the "owner_member" edge to the HPMember entity.
func (hipu *HPIgPostUpdate) SetOwnerMemberID(i int) *HPIgPostUpdate
SetOwnerMemberID sets the "owner_member_id" field.
func (hipu *HPIgPostUpdate) SetPostAt(t time.Time) *HPIgPostUpdate
SetPostAt sets the "post_at" field.
func (hipu *HPIgPostUpdate) SetRecrawlArgs(jica *jsonfields.HPIgCrawlArgs) *HPIgPostUpdate
SetRecrawlArgs sets the "recrawl_args" field.
func (hipu *HPIgPostUpdate) SetRecrawlRequired(b bool) *HPIgPostUpdate
SetRecrawlRequired sets the "recrawl_required" field.
func (hipu *HPIgPostUpdate) SetShortcode(s string) *HPIgPostUpdate
SetShortcode sets the "shortcode" field.
func (hipu *HPIgPostUpdate) SetUpdatedAt(t time.Time) *HPIgPostUpdate
SetUpdatedAt sets the "updated_at" field.
func (hipu *HPIgPostUpdate) Where(ps ...predicate.HPIgPost) *HPIgPostUpdate
Where appends a list predicates to the HPIgPostUpdate builder.
HPIgPostUpdateOne is the builder for updating a single HPIgPost entity.
type HPIgPostUpdateOne struct {
// contains filtered or unexported fields
}
func (hipuo *HPIgPostUpdateOne) AddBlobIDs(ids ...int) *HPIgPostUpdateOne
AddBlobIDs adds the "blobs" edge to the HPBlob entity by IDs.
func (hipuo *HPIgPostUpdateOne) AddBlobs(h ...*HPBlob) *HPIgPostUpdateOne
AddBlobs adds the "blobs" edges to the HPBlob entity.
func (hipuo *HPIgPostUpdateOne) AddComments(i int) *HPIgPostUpdateOne
AddComments adds i to the "comments" field.
func (hipuo *HPIgPostUpdateOne) AddErrorCount(i int) *HPIgPostUpdateOne
AddErrorCount adds i to the "error_count" field.
func (hipuo *HPIgPostUpdateOne) AddLikes(i int) *HPIgPostUpdateOne
AddLikes adds i to the "likes" field.
func (hipuo *HPIgPostUpdateOne) AddTaggedArtistIDs(ids ...int) *HPIgPostUpdateOne
AddTaggedArtistIDs adds the "tagged_artists" edge to the HPArtist entity by IDs.
func (hipuo *HPIgPostUpdateOne) AddTaggedArtists(h ...*HPArtist) *HPIgPostUpdateOne
AddTaggedArtists adds the "tagged_artists" edges to the HPArtist entity.
func (hipuo *HPIgPostUpdateOne) AddTaggedMemberIDs(ids ...int) *HPIgPostUpdateOne
AddTaggedMemberIDs adds the "tagged_members" edge to the HPMember entity by IDs.
func (hipuo *HPIgPostUpdateOne) AddTaggedMembers(h ...*HPMember) *HPIgPostUpdateOne
AddTaggedMembers adds the "tagged_members" edges to the HPMember entity.
func (hipuo *HPIgPostUpdateOne) AppendMedia(j []jsonfields.Media) *HPIgPostUpdateOne
AppendMedia appends j to the "media" field.
func (hipuo *HPIgPostUpdateOne) ClearAsset() *HPIgPostUpdateOne
ClearAsset clears the "asset" edge to the HPAsset entity.
func (hipuo *HPIgPostUpdateOne) ClearBlobs() *HPIgPostUpdateOne
ClearBlobs clears all "blobs" edges to the HPBlob entity.
func (hipuo *HPIgPostUpdateOne) ClearCrawledAt() *HPIgPostUpdateOne
ClearCrawledAt clears the value of the "crawled_at" field.
func (hipuo *HPIgPostUpdateOne) ClearLastErrorMessage() *HPIgPostUpdateOne
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (hipuo *HPIgPostUpdateOne) ClearManuallyModified() *HPIgPostUpdateOne
ClearManuallyModified clears the value of the "manually_modified" field.
func (hipuo *HPIgPostUpdateOne) ClearOwnerArtist() *HPIgPostUpdateOne
ClearOwnerArtist clears the "owner_artist" edge to the HPArtist entity.
func (hipuo *HPIgPostUpdateOne) ClearOwnerArtistID() *HPIgPostUpdateOne
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (hipuo *HPIgPostUpdateOne) ClearOwnerMember() *HPIgPostUpdateOne
ClearOwnerMember clears the "owner_member" edge to the HPMember entity.
func (hipuo *HPIgPostUpdateOne) ClearOwnerMemberID() *HPIgPostUpdateOne
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (hipuo *HPIgPostUpdateOne) ClearRecrawlArgs() *HPIgPostUpdateOne
ClearRecrawlArgs clears the value of the "recrawl_args" field.
func (hipuo *HPIgPostUpdateOne) ClearRecrawlRequired() *HPIgPostUpdateOne
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (hipuo *HPIgPostUpdateOne) ClearTaggedArtists() *HPIgPostUpdateOne
ClearTaggedArtists clears all "tagged_artists" edges to the HPArtist entity.
func (hipuo *HPIgPostUpdateOne) ClearTaggedMembers() *HPIgPostUpdateOne
ClearTaggedMembers clears all "tagged_members" edges to the HPMember entity.
func (hipuo *HPIgPostUpdateOne) ClearUpdatedAt() *HPIgPostUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (hipuo *HPIgPostUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (hipuo *HPIgPostUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hipuo *HPIgPostUpdateOne) Mutation() *HPIgPostMutation
Mutation returns the HPIgPostMutation object of the builder.
func (hipuo *HPIgPostUpdateOne) RemoveBlobIDs(ids ...int) *HPIgPostUpdateOne
RemoveBlobIDs removes the "blobs" edge to HPBlob entities by IDs.
func (hipuo *HPIgPostUpdateOne) RemoveBlobs(h ...*HPBlob) *HPIgPostUpdateOne
RemoveBlobs removes "blobs" edges to HPBlob entities.
func (hipuo *HPIgPostUpdateOne) RemoveTaggedArtistIDs(ids ...int) *HPIgPostUpdateOne
RemoveTaggedArtistIDs removes the "tagged_artists" edge to HPArtist entities by IDs.
func (hipuo *HPIgPostUpdateOne) RemoveTaggedArtists(h ...*HPArtist) *HPIgPostUpdateOne
RemoveTaggedArtists removes "tagged_artists" edges to HPArtist entities.
func (hipuo *HPIgPostUpdateOne) RemoveTaggedMemberIDs(ids ...int) *HPIgPostUpdateOne
RemoveTaggedMemberIDs removes the "tagged_members" edge to HPMember entities by IDs.
func (hipuo *HPIgPostUpdateOne) RemoveTaggedMembers(h ...*HPMember) *HPIgPostUpdateOne
RemoveTaggedMembers removes "tagged_members" edges to HPMember entities.
func (hipuo *HPIgPostUpdateOne) Save(ctx context.Context) (*HPIgPost, error)
Save executes the query and returns the updated HPIgPost entity.
func (hipuo *HPIgPostUpdateOne) SaveX(ctx context.Context) *HPIgPost
SaveX is like Save, but panics if an error occurs.
func (hipuo *HPIgPostUpdateOne) Select(field string, fields ...string) *HPIgPostUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (hipuo *HPIgPostUpdateOne) SetAsset(h *HPAsset) *HPIgPostUpdateOne
SetAsset sets the "asset" edge to the HPAsset entity.
func (hipuo *HPIgPostUpdateOne) SetAssetID(id int) *HPIgPostUpdateOne
SetAssetID sets the "asset" edge to the HPAsset entity by ID.
func (hipuo *HPIgPostUpdateOne) SetComments(i int) *HPIgPostUpdateOne
SetComments sets the "comments" field.
func (hipuo *HPIgPostUpdateOne) SetCrawledAt(t time.Time) *HPIgPostUpdateOne
SetCrawledAt sets the "crawled_at" field.
func (hipuo *HPIgPostUpdateOne) SetDescription(s string) *HPIgPostUpdateOne
SetDescription sets the "description" field.
func (hipuo *HPIgPostUpdateOne) SetErrorCount(i int) *HPIgPostUpdateOne
SetErrorCount sets the "error_count" field.
func (hipuo *HPIgPostUpdateOne) SetLastErrorMessage(s string) *HPIgPostUpdateOne
SetLastErrorMessage sets the "last_error_message" field.
func (hipuo *HPIgPostUpdateOne) SetLikes(i int) *HPIgPostUpdateOne
SetLikes sets the "likes" field.
func (hipuo *HPIgPostUpdateOne) SetManuallyModified(jm *jsonfields.ManuallyModified) *HPIgPostUpdateOne
SetManuallyModified sets the "manually_modified" field.
func (hipuo *HPIgPostUpdateOne) SetMedia(j []jsonfields.Media) *HPIgPostUpdateOne
SetMedia sets the "media" field.
func (hipuo *HPIgPostUpdateOne) SetNillableAssetID(id *int) *HPIgPostUpdateOne
SetNillableAssetID sets the "asset" edge to the HPAsset entity by ID if the given value is not nil.
func (hipuo *HPIgPostUpdateOne) SetNillableCrawledAt(t *time.Time) *HPIgPostUpdateOne
SetNillableCrawledAt sets the "crawled_at" field if the given value is not nil.
func (hipuo *HPIgPostUpdateOne) SetNillableErrorCount(i *int) *HPIgPostUpdateOne
SetNillableErrorCount sets the "error_count" field if the given value is not nil.
func (hipuo *HPIgPostUpdateOne) SetNillableLastErrorMessage(s *string) *HPIgPostUpdateOne
SetNillableLastErrorMessage sets the "last_error_message" field if the given value is not nil.
func (hipuo *HPIgPostUpdateOne) SetNillableOwnerArtistID(i *int) *HPIgPostUpdateOne
SetNillableOwnerArtistID sets the "owner_artist_id" field if the given value is not nil.
func (hipuo *HPIgPostUpdateOne) SetNillableOwnerMemberID(i *int) *HPIgPostUpdateOne
SetNillableOwnerMemberID sets the "owner_member_id" field if the given value is not nil.
func (hipuo *HPIgPostUpdateOne) SetNillableRecrawlRequired(b *bool) *HPIgPostUpdateOne
SetNillableRecrawlRequired sets the "recrawl_required" field if the given value is not nil.
func (hipuo *HPIgPostUpdateOne) SetNillableUpdatedAt(t *time.Time) *HPIgPostUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hipuo *HPIgPostUpdateOne) SetOwnerArtist(h *HPArtist) *HPIgPostUpdateOne
SetOwnerArtist sets the "owner_artist" edge to the HPArtist entity.
func (hipuo *HPIgPostUpdateOne) SetOwnerArtistID(i int) *HPIgPostUpdateOne
SetOwnerArtistID sets the "owner_artist_id" field.
func (hipuo *HPIgPostUpdateOne) SetOwnerMember(h *HPMember) *HPIgPostUpdateOne
SetOwnerMember sets the "owner_member" edge to the HPMember entity.
func (hipuo *HPIgPostUpdateOne) SetOwnerMemberID(i int) *HPIgPostUpdateOne
SetOwnerMemberID sets the "owner_member_id" field.
func (hipuo *HPIgPostUpdateOne) SetPostAt(t time.Time) *HPIgPostUpdateOne
SetPostAt sets the "post_at" field.
func (hipuo *HPIgPostUpdateOne) SetRecrawlArgs(jica *jsonfields.HPIgCrawlArgs) *HPIgPostUpdateOne
SetRecrawlArgs sets the "recrawl_args" field.
func (hipuo *HPIgPostUpdateOne) SetRecrawlRequired(b bool) *HPIgPostUpdateOne
SetRecrawlRequired sets the "recrawl_required" field.
func (hipuo *HPIgPostUpdateOne) SetShortcode(s string) *HPIgPostUpdateOne
SetShortcode sets the "shortcode" field.
func (hipuo *HPIgPostUpdateOne) SetUpdatedAt(t time.Time) *HPIgPostUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (hipuo *HPIgPostUpdateOne) Where(ps ...predicate.HPIgPost) *HPIgPostUpdateOne
Where appends a list predicates to the HPIgPostUpdate builder.
HPIgPostUpsert is the "OnConflict" setter.
type HPIgPostUpsert struct {
*sql.UpdateSet
}
func (u *HPIgPostUpsert) AddComments(v int) *HPIgPostUpsert
AddComments adds v to the "comments" field.
func (u *HPIgPostUpsert) AddErrorCount(v int) *HPIgPostUpsert
AddErrorCount adds v to the "error_count" field.
func (u *HPIgPostUpsert) AddLikes(v int) *HPIgPostUpsert
AddLikes adds v to the "likes" field.
func (u *HPIgPostUpsert) ClearCrawledAt() *HPIgPostUpsert
ClearCrawledAt clears the value of the "crawled_at" field.
func (u *HPIgPostUpsert) ClearLastErrorMessage() *HPIgPostUpsert
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (u *HPIgPostUpsert) ClearManuallyModified() *HPIgPostUpsert
ClearManuallyModified clears the value of the "manually_modified" field.
func (u *HPIgPostUpsert) ClearOwnerArtistID() *HPIgPostUpsert
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (u *HPIgPostUpsert) ClearOwnerMemberID() *HPIgPostUpsert
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (u *HPIgPostUpsert) ClearRecrawlArgs() *HPIgPostUpsert
ClearRecrawlArgs clears the value of the "recrawl_args" field.
func (u *HPIgPostUpsert) ClearRecrawlRequired() *HPIgPostUpsert
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (u *HPIgPostUpsert) ClearUpdatedAt() *HPIgPostUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPIgPostUpsert) SetComments(v int) *HPIgPostUpsert
SetComments sets the "comments" field.
func (u *HPIgPostUpsert) SetCrawledAt(v time.Time) *HPIgPostUpsert
SetCrawledAt sets the "crawled_at" field.
func (u *HPIgPostUpsert) SetDescription(v string) *HPIgPostUpsert
SetDescription sets the "description" field.
func (u *HPIgPostUpsert) SetErrorCount(v int) *HPIgPostUpsert
SetErrorCount sets the "error_count" field.
func (u *HPIgPostUpsert) SetLastErrorMessage(v string) *HPIgPostUpsert
SetLastErrorMessage sets the "last_error_message" field.
func (u *HPIgPostUpsert) SetLikes(v int) *HPIgPostUpsert
SetLikes sets the "likes" field.
func (u *HPIgPostUpsert) SetManuallyModified(v *jsonfields.ManuallyModified) *HPIgPostUpsert
SetManuallyModified sets the "manually_modified" field.
func (u *HPIgPostUpsert) SetMedia(v []jsonfields.Media) *HPIgPostUpsert
SetMedia sets the "media" field.
func (u *HPIgPostUpsert) SetOwnerArtistID(v int) *HPIgPostUpsert
SetOwnerArtistID sets the "owner_artist_id" field.
func (u *HPIgPostUpsert) SetOwnerMemberID(v int) *HPIgPostUpsert
SetOwnerMemberID sets the "owner_member_id" field.
func (u *HPIgPostUpsert) SetPostAt(v time.Time) *HPIgPostUpsert
SetPostAt sets the "post_at" field.
func (u *HPIgPostUpsert) SetRecrawlArgs(v *jsonfields.HPIgCrawlArgs) *HPIgPostUpsert
SetRecrawlArgs sets the "recrawl_args" field.
func (u *HPIgPostUpsert) SetRecrawlRequired(v bool) *HPIgPostUpsert
SetRecrawlRequired sets the "recrawl_required" field.
func (u *HPIgPostUpsert) SetShortcode(v string) *HPIgPostUpsert
SetShortcode sets the "shortcode" field.
func (u *HPIgPostUpsert) SetUpdatedAt(v time.Time) *HPIgPostUpsert
SetUpdatedAt sets the "updated_at" field.
func (u *HPIgPostUpsert) UpdateComments() *HPIgPostUpsert
UpdateComments sets the "comments" field to the value that was provided on create.
func (u *HPIgPostUpsert) UpdateCrawledAt() *HPIgPostUpsert
UpdateCrawledAt sets the "crawled_at" field to the value that was provided on create.
func (u *HPIgPostUpsert) UpdateDescription() *HPIgPostUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (u *HPIgPostUpsert) UpdateErrorCount() *HPIgPostUpsert
UpdateErrorCount sets the "error_count" field to the value that was provided on create.
func (u *HPIgPostUpsert) UpdateLastErrorMessage() *HPIgPostUpsert
UpdateLastErrorMessage sets the "last_error_message" field to the value that was provided on create.
func (u *HPIgPostUpsert) UpdateLikes() *HPIgPostUpsert
UpdateLikes sets the "likes" field to the value that was provided on create.
func (u *HPIgPostUpsert) UpdateManuallyModified() *HPIgPostUpsert
UpdateManuallyModified sets the "manually_modified" field to the value that was provided on create.
func (u *HPIgPostUpsert) UpdateMedia() *HPIgPostUpsert
UpdateMedia sets the "media" field to the value that was provided on create.
func (u *HPIgPostUpsert) UpdateOwnerArtistID() *HPIgPostUpsert
UpdateOwnerArtistID sets the "owner_artist_id" field to the value that was provided on create.
func (u *HPIgPostUpsert) UpdateOwnerMemberID() *HPIgPostUpsert
UpdateOwnerMemberID sets the "owner_member_id" field to the value that was provided on create.
func (u *HPIgPostUpsert) UpdatePostAt() *HPIgPostUpsert
UpdatePostAt sets the "post_at" field to the value that was provided on create.
func (u *HPIgPostUpsert) UpdateRecrawlArgs() *HPIgPostUpsert
UpdateRecrawlArgs sets the "recrawl_args" field to the value that was provided on create.
func (u *HPIgPostUpsert) UpdateRecrawlRequired() *HPIgPostUpsert
UpdateRecrawlRequired sets the "recrawl_required" field to the value that was provided on create.
func (u *HPIgPostUpsert) UpdateShortcode() *HPIgPostUpsert
UpdateShortcode sets the "shortcode" field to the value that was provided on create.
func (u *HPIgPostUpsert) UpdateUpdatedAt() *HPIgPostUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPIgPostUpsertBulk is the builder for "upsert"-ing a bulk of HPIgPost nodes.
type HPIgPostUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *HPIgPostUpsertBulk) AddComments(v int) *HPIgPostUpsertBulk
AddComments adds v to the "comments" field.
func (u *HPIgPostUpsertBulk) AddErrorCount(v int) *HPIgPostUpsertBulk
AddErrorCount adds v to the "error_count" field.
func (u *HPIgPostUpsertBulk) AddLikes(v int) *HPIgPostUpsertBulk
AddLikes adds v to the "likes" field.
func (u *HPIgPostUpsertBulk) ClearCrawledAt() *HPIgPostUpsertBulk
ClearCrawledAt clears the value of the "crawled_at" field.
func (u *HPIgPostUpsertBulk) ClearLastErrorMessage() *HPIgPostUpsertBulk
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (u *HPIgPostUpsertBulk) ClearManuallyModified() *HPIgPostUpsertBulk
ClearManuallyModified clears the value of the "manually_modified" field.
func (u *HPIgPostUpsertBulk) ClearOwnerArtistID() *HPIgPostUpsertBulk
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (u *HPIgPostUpsertBulk) ClearOwnerMemberID() *HPIgPostUpsertBulk
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (u *HPIgPostUpsertBulk) ClearRecrawlArgs() *HPIgPostUpsertBulk
ClearRecrawlArgs clears the value of the "recrawl_args" field.
func (u *HPIgPostUpsertBulk) ClearRecrawlRequired() *HPIgPostUpsertBulk
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (u *HPIgPostUpsertBulk) ClearUpdatedAt() *HPIgPostUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPIgPostUpsertBulk) DoNothing() *HPIgPostUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPIgPostUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPIgPostUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPIgPostUpsertBulk) Ignore() *HPIgPostUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPIgPost.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *HPIgPostUpsertBulk) SetComments(v int) *HPIgPostUpsertBulk
SetComments sets the "comments" field.
func (u *HPIgPostUpsertBulk) SetCrawledAt(v time.Time) *HPIgPostUpsertBulk
SetCrawledAt sets the "crawled_at" field.
func (u *HPIgPostUpsertBulk) SetDescription(v string) *HPIgPostUpsertBulk
SetDescription sets the "description" field.
func (u *HPIgPostUpsertBulk) SetErrorCount(v int) *HPIgPostUpsertBulk
SetErrorCount sets the "error_count" field.
func (u *HPIgPostUpsertBulk) SetLastErrorMessage(v string) *HPIgPostUpsertBulk
SetLastErrorMessage sets the "last_error_message" field.
func (u *HPIgPostUpsertBulk) SetLikes(v int) *HPIgPostUpsertBulk
SetLikes sets the "likes" field.
func (u *HPIgPostUpsertBulk) SetManuallyModified(v *jsonfields.ManuallyModified) *HPIgPostUpsertBulk
SetManuallyModified sets the "manually_modified" field.
func (u *HPIgPostUpsertBulk) SetMedia(v []jsonfields.Media) *HPIgPostUpsertBulk
SetMedia sets the "media" field.
func (u *HPIgPostUpsertBulk) SetOwnerArtistID(v int) *HPIgPostUpsertBulk
SetOwnerArtistID sets the "owner_artist_id" field.
func (u *HPIgPostUpsertBulk) SetOwnerMemberID(v int) *HPIgPostUpsertBulk
SetOwnerMemberID sets the "owner_member_id" field.
func (u *HPIgPostUpsertBulk) SetPostAt(v time.Time) *HPIgPostUpsertBulk
SetPostAt sets the "post_at" field.
func (u *HPIgPostUpsertBulk) SetRecrawlArgs(v *jsonfields.HPIgCrawlArgs) *HPIgPostUpsertBulk
SetRecrawlArgs sets the "recrawl_args" field.
func (u *HPIgPostUpsertBulk) SetRecrawlRequired(v bool) *HPIgPostUpsertBulk
SetRecrawlRequired sets the "recrawl_required" field.
func (u *HPIgPostUpsertBulk) SetShortcode(v string) *HPIgPostUpsertBulk
SetShortcode sets the "shortcode" field.
func (u *HPIgPostUpsertBulk) SetUpdatedAt(v time.Time) *HPIgPostUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (u *HPIgPostUpsertBulk) Update(set func(*HPIgPostUpsert)) *HPIgPostUpsertBulk
Update allows overriding fields `UPDATE` values. See the HPIgPostCreateBulk.OnConflict documentation for more info.
func (u *HPIgPostUpsertBulk) UpdateComments() *HPIgPostUpsertBulk
UpdateComments sets the "comments" field to the value that was provided on create.
func (u *HPIgPostUpsertBulk) UpdateCrawledAt() *HPIgPostUpsertBulk
UpdateCrawledAt sets the "crawled_at" field to the value that was provided on create.
func (u *HPIgPostUpsertBulk) UpdateDescription() *HPIgPostUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (u *HPIgPostUpsertBulk) UpdateErrorCount() *HPIgPostUpsertBulk
UpdateErrorCount sets the "error_count" field to the value that was provided on create.
func (u *HPIgPostUpsertBulk) UpdateLastErrorMessage() *HPIgPostUpsertBulk
UpdateLastErrorMessage sets the "last_error_message" field to the value that was provided on create.
func (u *HPIgPostUpsertBulk) UpdateLikes() *HPIgPostUpsertBulk
UpdateLikes sets the "likes" field to the value that was provided on create.
func (u *HPIgPostUpsertBulk) UpdateManuallyModified() *HPIgPostUpsertBulk
UpdateManuallyModified sets the "manually_modified" field to the value that was provided on create.
func (u *HPIgPostUpsertBulk) UpdateMedia() *HPIgPostUpsertBulk
UpdateMedia sets the "media" field to the value that was provided on create.
func (u *HPIgPostUpsertBulk) UpdateNewValues() *HPIgPostUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPIgPost.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPIgPostUpsertBulk) UpdateOwnerArtistID() *HPIgPostUpsertBulk
UpdateOwnerArtistID sets the "owner_artist_id" field to the value that was provided on create.
func (u *HPIgPostUpsertBulk) UpdateOwnerMemberID() *HPIgPostUpsertBulk
UpdateOwnerMemberID sets the "owner_member_id" field to the value that was provided on create.
func (u *HPIgPostUpsertBulk) UpdatePostAt() *HPIgPostUpsertBulk
UpdatePostAt sets the "post_at" field to the value that was provided on create.
func (u *HPIgPostUpsertBulk) UpdateRecrawlArgs() *HPIgPostUpsertBulk
UpdateRecrawlArgs sets the "recrawl_args" field to the value that was provided on create.
func (u *HPIgPostUpsertBulk) UpdateRecrawlRequired() *HPIgPostUpsertBulk
UpdateRecrawlRequired sets the "recrawl_required" field to the value that was provided on create.
func (u *HPIgPostUpsertBulk) UpdateShortcode() *HPIgPostUpsertBulk
UpdateShortcode sets the "shortcode" field to the value that was provided on create.
func (u *HPIgPostUpsertBulk) UpdateUpdatedAt() *HPIgPostUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPIgPostUpsertOne is the builder for "upsert"-ing
one HPIgPost node.
type HPIgPostUpsertOne struct {
// contains filtered or unexported fields
}
func (u *HPIgPostUpsertOne) AddComments(v int) *HPIgPostUpsertOne
AddComments adds v to the "comments" field.
func (u *HPIgPostUpsertOne) AddErrorCount(v int) *HPIgPostUpsertOne
AddErrorCount adds v to the "error_count" field.
func (u *HPIgPostUpsertOne) AddLikes(v int) *HPIgPostUpsertOne
AddLikes adds v to the "likes" field.
func (u *HPIgPostUpsertOne) ClearCrawledAt() *HPIgPostUpsertOne
ClearCrawledAt clears the value of the "crawled_at" field.
func (u *HPIgPostUpsertOne) ClearLastErrorMessage() *HPIgPostUpsertOne
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (u *HPIgPostUpsertOne) ClearManuallyModified() *HPIgPostUpsertOne
ClearManuallyModified clears the value of the "manually_modified" field.
func (u *HPIgPostUpsertOne) ClearOwnerArtistID() *HPIgPostUpsertOne
ClearOwnerArtistID clears the value of the "owner_artist_id" field.
func (u *HPIgPostUpsertOne) ClearOwnerMemberID() *HPIgPostUpsertOne
ClearOwnerMemberID clears the value of the "owner_member_id" field.
func (u *HPIgPostUpsertOne) ClearRecrawlArgs() *HPIgPostUpsertOne
ClearRecrawlArgs clears the value of the "recrawl_args" field.
func (u *HPIgPostUpsertOne) ClearRecrawlRequired() *HPIgPostUpsertOne
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (u *HPIgPostUpsertOne) ClearUpdatedAt() *HPIgPostUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPIgPostUpsertOne) DoNothing() *HPIgPostUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPIgPostUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPIgPostUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPIgPostUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *HPIgPostUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *HPIgPostUpsertOne) Ignore() *HPIgPostUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPIgPost.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *HPIgPostUpsertOne) SetComments(v int) *HPIgPostUpsertOne
SetComments sets the "comments" field.
func (u *HPIgPostUpsertOne) SetCrawledAt(v time.Time) *HPIgPostUpsertOne
SetCrawledAt sets the "crawled_at" field.
func (u *HPIgPostUpsertOne) SetDescription(v string) *HPIgPostUpsertOne
SetDescription sets the "description" field.
func (u *HPIgPostUpsertOne) SetErrorCount(v int) *HPIgPostUpsertOne
SetErrorCount sets the "error_count" field.
func (u *HPIgPostUpsertOne) SetLastErrorMessage(v string) *HPIgPostUpsertOne
SetLastErrorMessage sets the "last_error_message" field.
func (u *HPIgPostUpsertOne) SetLikes(v int) *HPIgPostUpsertOne
SetLikes sets the "likes" field.
func (u *HPIgPostUpsertOne) SetManuallyModified(v *jsonfields.ManuallyModified) *HPIgPostUpsertOne
SetManuallyModified sets the "manually_modified" field.
func (u *HPIgPostUpsertOne) SetMedia(v []jsonfields.Media) *HPIgPostUpsertOne
SetMedia sets the "media" field.
func (u *HPIgPostUpsertOne) SetOwnerArtistID(v int) *HPIgPostUpsertOne
SetOwnerArtistID sets the "owner_artist_id" field.
func (u *HPIgPostUpsertOne) SetOwnerMemberID(v int) *HPIgPostUpsertOne
SetOwnerMemberID sets the "owner_member_id" field.
func (u *HPIgPostUpsertOne) SetPostAt(v time.Time) *HPIgPostUpsertOne
SetPostAt sets the "post_at" field.
func (u *HPIgPostUpsertOne) SetRecrawlArgs(v *jsonfields.HPIgCrawlArgs) *HPIgPostUpsertOne
SetRecrawlArgs sets the "recrawl_args" field.
func (u *HPIgPostUpsertOne) SetRecrawlRequired(v bool) *HPIgPostUpsertOne
SetRecrawlRequired sets the "recrawl_required" field.
func (u *HPIgPostUpsertOne) SetShortcode(v string) *HPIgPostUpsertOne
SetShortcode sets the "shortcode" field.
func (u *HPIgPostUpsertOne) SetUpdatedAt(v time.Time) *HPIgPostUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (u *HPIgPostUpsertOne) Update(set func(*HPIgPostUpsert)) *HPIgPostUpsertOne
Update allows overriding fields `UPDATE` values. See the HPIgPostCreate.OnConflict documentation for more info.
func (u *HPIgPostUpsertOne) UpdateComments() *HPIgPostUpsertOne
UpdateComments sets the "comments" field to the value that was provided on create.
func (u *HPIgPostUpsertOne) UpdateCrawledAt() *HPIgPostUpsertOne
UpdateCrawledAt sets the "crawled_at" field to the value that was provided on create.
func (u *HPIgPostUpsertOne) UpdateDescription() *HPIgPostUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (u *HPIgPostUpsertOne) UpdateErrorCount() *HPIgPostUpsertOne
UpdateErrorCount sets the "error_count" field to the value that was provided on create.
func (u *HPIgPostUpsertOne) UpdateLastErrorMessage() *HPIgPostUpsertOne
UpdateLastErrorMessage sets the "last_error_message" field to the value that was provided on create.
func (u *HPIgPostUpsertOne) UpdateLikes() *HPIgPostUpsertOne
UpdateLikes sets the "likes" field to the value that was provided on create.
func (u *HPIgPostUpsertOne) UpdateManuallyModified() *HPIgPostUpsertOne
UpdateManuallyModified sets the "manually_modified" field to the value that was provided on create.
func (u *HPIgPostUpsertOne) UpdateMedia() *HPIgPostUpsertOne
UpdateMedia sets the "media" field to the value that was provided on create.
func (u *HPIgPostUpsertOne) UpdateNewValues() *HPIgPostUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPIgPost.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPIgPostUpsertOne) UpdateOwnerArtistID() *HPIgPostUpsertOne
UpdateOwnerArtistID sets the "owner_artist_id" field to the value that was provided on create.
func (u *HPIgPostUpsertOne) UpdateOwnerMemberID() *HPIgPostUpsertOne
UpdateOwnerMemberID sets the "owner_member_id" field to the value that was provided on create.
func (u *HPIgPostUpsertOne) UpdatePostAt() *HPIgPostUpsertOne
UpdatePostAt sets the "post_at" field to the value that was provided on create.
func (u *HPIgPostUpsertOne) UpdateRecrawlArgs() *HPIgPostUpsertOne
UpdateRecrawlArgs sets the "recrawl_args" field to the value that was provided on create.
func (u *HPIgPostUpsertOne) UpdateRecrawlRequired() *HPIgPostUpsertOne
UpdateRecrawlRequired sets the "recrawl_required" field to the value that was provided on create.
func (u *HPIgPostUpsertOne) UpdateShortcode() *HPIgPostUpsertOne
UpdateShortcode sets the "shortcode" field to the value that was provided on create.
func (u *HPIgPostUpsertOne) UpdateUpdatedAt() *HPIgPostUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPIgPosts is a parsable slice of HPIgPost.
type HPIgPosts []*HPIgPost
HPMember is the model entity for the HPMember schema.
type HPMember struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CrawledAt holds the value of the "crawled_at" field.
CrawledAt *time.Time `json:"crawled_at,omitempty"`
// ErrorCount holds the value of the "error_count" field.
ErrorCount int `json:"error_count,omitempty"`
// ManuallyModified holds the value of the "manually_modified" field.
ManuallyModified *jsonfields.ManuallyModified `json:"manually_modified,omitempty"`
// LastErrorMessage holds the value of the "last_error_message" field.
LastErrorMessage *string `json:"last_error_message,omitempty"`
// RecrawlRequired holds the value of the "recrawl_required" field.
RecrawlRequired bool `json:"recrawl_required,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Key holds the value of the "key" field.
Key string `json:"key,omitempty"`
// ArtistKey holds the value of the "artist_key" field.
ArtistKey string `json:"artist_key,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// NameKana holds the value of the "name_kana" field.
NameKana string `json:"name_kana,omitempty"`
// ThumbnailURL holds the value of the "thumbnail_url" field.
ThumbnailURL string `json:"thumbnail_url,omitempty"`
// DateOfBirth holds the value of the "date_of_birth" field.
DateOfBirth time.Time `json:"date_of_birth,omitempty"`
// BloodType holds the value of the "blood_type" field.
BloodType string `json:"blood_type,omitempty"`
// Hometown holds the value of the "hometown" field.
Hometown string `json:"hometown,omitempty"`
// JoinAt holds the value of the "join_at" field.
JoinAt *time.Time `json:"join_at,omitempty"`
// GraduateAt holds the value of the "graduate_at" field.
GraduateAt *time.Time `json:"graduate_at,omitempty"`
// ArtistID holds the value of the "artist_id" field.
ArtistID *int `json:"artist_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the HPMemberQuery when eager-loading is set.
Edges HPMemberEdges `json:"edges"`
// contains filtered or unexported fields
}
func (hm *HPMember) Artist(ctx context.Context) (*HPArtist, error)
func (n *HPMember) IsNode()
IsNode implements the Node interface check for GQLGen.
func (hm *HPMember) NamedAssets(name string) ([]*HPAsset, error)
NamedAssets returns the Assets named value or an error if the edge was not loaded in eager-loading with this name.
func (hm *HPMember) NamedFollowedBy(name string) ([]*HPFollow, error)
NamedFollowedBy returns the FollowedBy named value or an error if the edge was not loaded in eager-loading with this name.
func (hm *HPMember) NamedOwningAmebloPosts(name string) ([]*HPAmebloPost, error)
NamedOwningAmebloPosts returns the OwningAmebloPosts named value or an error if the edge was not loaded in eager-loading with this name.
func (hm *HPMember) NamedOwningFeed(name string) ([]*HPFeedItem, error)
NamedOwningFeed returns the OwningFeed named value or an error if the edge was not loaded in eager-loading with this name.
func (hm *HPMember) NamedOwningIgPosts(name string) ([]*HPIgPost, error)
NamedOwningIgPosts returns the OwningIgPosts named value or an error if the edge was not loaded in eager-loading with this name.
func (hm *HPMember) NamedTaggedAmebloPosts(name string) ([]*HPAmebloPost, error)
NamedTaggedAmebloPosts returns the TaggedAmebloPosts named value or an error if the edge was not loaded in eager-loading with this name.
func (hm *HPMember) NamedTaggedElineupMallItems(name string) ([]*HPElineupMallItem, error)
NamedTaggedElineupMallItems returns the TaggedElineupMallItems named value or an error if the edge was not loaded in eager-loading with this name.
func (hm *HPMember) NamedTaggedFeed(name string) ([]*HPFeedItem, error)
NamedTaggedFeed returns the TaggedFeed named value or an error if the edge was not loaded in eager-loading with this name.
func (hm *HPMember) NamedTaggedIgPosts(name string) ([]*HPIgPost, error)
NamedTaggedIgPosts returns the TaggedIgPosts named value or an error if the edge was not loaded in eager-loading with this name.
func (hm *HPMember) QueryArtist() *HPArtistQuery
QueryArtist queries the "artist" edge of the HPMember entity.
func (hm *HPMember) QueryAssets() *HPAssetQuery
QueryAssets queries the "assets" edge of the HPMember entity.
func (hm *HPMember) QueryFollowedBy() *HPFollowQuery
QueryFollowedBy queries the "followed_by" edge of the HPMember entity.
func (hm *HPMember) QueryOwningAmebloPosts() *HPAmebloPostQuery
QueryOwningAmebloPosts queries the "owning_ameblo_posts" edge of the HPMember entity.
func (hm *HPMember) QueryOwningFeed() *HPFeedItemQuery
QueryOwningFeed queries the "owning_feed" edge of the HPMember entity.
func (hm *HPMember) QueryOwningIgPosts() *HPIgPostQuery
QueryOwningIgPosts queries the "owning_ig_posts" edge of the HPMember entity.
func (hm *HPMember) QueryTaggedAmebloPosts() *HPAmebloPostQuery
QueryTaggedAmebloPosts queries the "tagged_ameblo_posts" edge of the HPMember entity.
func (hm *HPMember) QueryTaggedElineupMallItems() *HPElineupMallItemQuery
QueryTaggedElineupMallItems queries the "tagged_elineup_mall_items" edge of the HPMember entity.
func (hm *HPMember) QueryTaggedFeed() *HPFeedItemQuery
QueryTaggedFeed queries the "tagged_feed" edge of the HPMember entity.
func (hm *HPMember) QueryTaggedIgPosts() *HPIgPostQuery
QueryTaggedIgPosts queries the "tagged_ig_posts" edge of the HPMember entity.
func (hm *HPMember) String() string
String implements the fmt.Stringer.
func (hm *HPMember) ToEdge(order *HPMemberOrder) *HPMemberEdge
ToEdge converts HPMember into HPMemberEdge.
func (hm *HPMember) Unwrap() *HPMember
Unwrap unwraps the HPMember entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (hm *HPMember) Update() *HPMemberUpdateOne
Update returns a builder for updating this HPMember. Note that you need to call HPMember.Unwrap() before calling this method if this HPMember was returned from a transaction, and the transaction was committed or rolled back.
func (hm *HPMember) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the HPMember. This includes values selected through modifiers, order, etc.
HPMemberClient is a client for the HPMember schema.
type HPMemberClient struct {
// contains filtered or unexported fields
}
func NewHPMemberClient(c config) *HPMemberClient
NewHPMemberClient returns a client for the HPMember from the given config.
func (c *HPMemberClient) Create() *HPMemberCreate
Create returns a builder for creating a HPMember entity.
func (c *HPMemberClient) CreateBulk(builders ...*HPMemberCreate) *HPMemberCreateBulk
CreateBulk returns a builder for creating a bulk of HPMember entities.
func (c *HPMemberClient) Delete() *HPMemberDelete
Delete returns a delete builder for HPMember.
func (c *HPMemberClient) DeleteOne(hm *HPMember) *HPMemberDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *HPMemberClient) DeleteOneID(id int) *HPMemberDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *HPMemberClient) Get(ctx context.Context, id int) (*HPMember, error)
Get returns a HPMember entity by its id.
func (c *HPMemberClient) GetX(ctx context.Context, id int) *HPMember
GetX is like Get, but panics if an error occurs.
func (c *HPMemberClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *HPMemberClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hpmember.Intercept(f(g(h())))`.
func (c *HPMemberClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *HPMemberClient) Query() *HPMemberQuery
Query returns a query builder for HPMember.
func (c *HPMemberClient) QueryArtist(hm *HPMember) *HPArtistQuery
QueryArtist queries the artist edge of a HPMember.
func (c *HPMemberClient) QueryAssets(hm *HPMember) *HPAssetQuery
QueryAssets queries the assets edge of a HPMember.
func (c *HPMemberClient) QueryFollowedBy(hm *HPMember) *HPFollowQuery
QueryFollowedBy queries the followed_by edge of a HPMember.
func (c *HPMemberClient) QueryOwningAmebloPosts(hm *HPMember) *HPAmebloPostQuery
QueryOwningAmebloPosts queries the owning_ameblo_posts edge of a HPMember.
func (c *HPMemberClient) QueryOwningFeed(hm *HPMember) *HPFeedItemQuery
QueryOwningFeed queries the owning_feed edge of a HPMember.
func (c *HPMemberClient) QueryOwningIgPosts(hm *HPMember) *HPIgPostQuery
QueryOwningIgPosts queries the owning_ig_posts edge of a HPMember.
func (c *HPMemberClient) QueryTaggedAmebloPosts(hm *HPMember) *HPAmebloPostQuery
QueryTaggedAmebloPosts queries the tagged_ameblo_posts edge of a HPMember.
func (c *HPMemberClient) QueryTaggedElineupMallItems(hm *HPMember) *HPElineupMallItemQuery
QueryTaggedElineupMallItems queries the tagged_elineup_mall_items edge of a HPMember.
func (c *HPMemberClient) QueryTaggedFeed(hm *HPMember) *HPFeedItemQuery
QueryTaggedFeed queries the tagged_feed edge of a HPMember.
func (c *HPMemberClient) QueryTaggedIgPosts(hm *HPMember) *HPIgPostQuery
QueryTaggedIgPosts queries the tagged_ig_posts edge of a HPMember.
func (c *HPMemberClient) Update() *HPMemberUpdate
Update returns an update builder for HPMember.
func (c *HPMemberClient) UpdateOne(hm *HPMember) *HPMemberUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *HPMemberClient) UpdateOneID(id int) *HPMemberUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *HPMemberClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hpmember.Hooks(f(g(h())))`.
HPMemberConnection is the connection containing edges to HPMember.
type HPMemberConnection struct {
Edges []*HPMemberEdge `json:"edges"`
PageInfo PageInfo `json:"pageInfo"`
TotalCount int `json:"totalCount"`
}
HPMemberCreate is the builder for creating a HPMember entity.
type HPMemberCreate struct {
// contains filtered or unexported fields
}
func (hmc *HPMemberCreate) AddAssetIDs(ids ...int) *HPMemberCreate
AddAssetIDs adds the "assets" edge to the HPAsset entity by IDs.
func (hmc *HPMemberCreate) AddAssets(h ...*HPAsset) *HPMemberCreate
AddAssets adds the "assets" edges to the HPAsset entity.
func (hmc *HPMemberCreate) AddFollowedBy(h ...*HPFollow) *HPMemberCreate
AddFollowedBy adds the "followed_by" edges to the HPFollow entity.
func (hmc *HPMemberCreate) AddFollowedByIDs(ids ...int) *HPMemberCreate
AddFollowedByIDs adds the "followed_by" edge to the HPFollow entity by IDs.
func (hmc *HPMemberCreate) AddOwningAmebloPostIDs(ids ...int) *HPMemberCreate
AddOwningAmebloPostIDs adds the "owning_ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hmc *HPMemberCreate) AddOwningAmebloPosts(h ...*HPAmebloPost) *HPMemberCreate
AddOwningAmebloPosts adds the "owning_ameblo_posts" edges to the HPAmebloPost entity.
func (hmc *HPMemberCreate) AddOwningFeed(h ...*HPFeedItem) *HPMemberCreate
AddOwningFeed adds the "owning_feed" edges to the HPFeedItem entity.
func (hmc *HPMemberCreate) AddOwningFeedIDs(ids ...int) *HPMemberCreate
AddOwningFeedIDs adds the "owning_feed" edge to the HPFeedItem entity by IDs.
func (hmc *HPMemberCreate) AddOwningIgPostIDs(ids ...int) *HPMemberCreate
AddOwningIgPostIDs adds the "owning_ig_posts" edge to the HPIgPost entity by IDs.
func (hmc *HPMemberCreate) AddOwningIgPosts(h ...*HPIgPost) *HPMemberCreate
AddOwningIgPosts adds the "owning_ig_posts" edges to the HPIgPost entity.
func (hmc *HPMemberCreate) AddTaggedAmebloPostIDs(ids ...int) *HPMemberCreate
AddTaggedAmebloPostIDs adds the "tagged_ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hmc *HPMemberCreate) AddTaggedAmebloPosts(h ...*HPAmebloPost) *HPMemberCreate
AddTaggedAmebloPosts adds the "tagged_ameblo_posts" edges to the HPAmebloPost entity.
func (hmc *HPMemberCreate) AddTaggedElineupMallItemIDs(ids ...int) *HPMemberCreate
AddTaggedElineupMallItemIDs adds the "tagged_elineup_mall_items" edge to the HPElineupMallItem entity by IDs.
func (hmc *HPMemberCreate) AddTaggedElineupMallItems(h ...*HPElineupMallItem) *HPMemberCreate
AddTaggedElineupMallItems adds the "tagged_elineup_mall_items" edges to the HPElineupMallItem entity.
func (hmc *HPMemberCreate) AddTaggedFeed(h ...*HPFeedItem) *HPMemberCreate
AddTaggedFeed adds the "tagged_feed" edges to the HPFeedItem entity.
func (hmc *HPMemberCreate) AddTaggedFeedIDs(ids ...int) *HPMemberCreate
AddTaggedFeedIDs adds the "tagged_feed" edge to the HPFeedItem entity by IDs.
func (hmc *HPMemberCreate) AddTaggedIgPostIDs(ids ...int) *HPMemberCreate
AddTaggedIgPostIDs adds the "tagged_ig_posts" edge to the HPIgPost entity by IDs.
func (hmc *HPMemberCreate) AddTaggedIgPosts(h ...*HPIgPost) *HPMemberCreate
AddTaggedIgPosts adds the "tagged_ig_posts" edges to the HPIgPost entity.
func (hmc *HPMemberCreate) Exec(ctx context.Context) error
Exec executes the query.
func (hmc *HPMemberCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hmc *HPMemberCreate) Mutation() *HPMemberMutation
Mutation returns the HPMemberMutation object of the builder.
func (hmc *HPMemberCreate) OnConflict(opts ...sql.ConflictOption) *HPMemberUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPMember.Create().
SetCrawledAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPMemberUpsert) {
SetCrawledAt(v+v).
}).
Exec(ctx)
func (hmc *HPMemberCreate) OnConflictColumns(columns ...string) *HPMemberUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPMember.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hmc *HPMemberCreate) Save(ctx context.Context) (*HPMember, error)
Save creates the HPMember in the database.
func (hmc *HPMemberCreate) SaveX(ctx context.Context) *HPMember
SaveX calls Save and panics if Save returns an error.
func (hmc *HPMemberCreate) SetArtist(h *HPArtist) *HPMemberCreate
SetArtist sets the "artist" edge to the HPArtist entity.
func (hmc *HPMemberCreate) SetArtistID(i int) *HPMemberCreate
SetArtistID sets the "artist_id" field.
func (hmc *HPMemberCreate) SetArtistKey(s string) *HPMemberCreate
SetArtistKey sets the "artist_key" field.
func (hmc *HPMemberCreate) SetBloodType(s string) *HPMemberCreate
SetBloodType sets the "blood_type" field.
func (hmc *HPMemberCreate) SetCrawledAt(t time.Time) *HPMemberCreate
SetCrawledAt sets the "crawled_at" field.
func (hmc *HPMemberCreate) SetCreatedAt(t time.Time) *HPMemberCreate
SetCreatedAt sets the "created_at" field.
func (hmc *HPMemberCreate) SetDateOfBirth(t time.Time) *HPMemberCreate
SetDateOfBirth sets the "date_of_birth" field.
func (hmc *HPMemberCreate) SetErrorCount(i int) *HPMemberCreate
SetErrorCount sets the "error_count" field.
func (hmc *HPMemberCreate) SetGraduateAt(t time.Time) *HPMemberCreate
SetGraduateAt sets the "graduate_at" field.
func (hmc *HPMemberCreate) SetHometown(s string) *HPMemberCreate
SetHometown sets the "hometown" field.
func (hmc *HPMemberCreate) SetJoinAt(t time.Time) *HPMemberCreate
SetJoinAt sets the "join_at" field.
func (hmc *HPMemberCreate) SetKey(s string) *HPMemberCreate
SetKey sets the "key" field.
func (hmc *HPMemberCreate) SetLastErrorMessage(s string) *HPMemberCreate
SetLastErrorMessage sets the "last_error_message" field.
func (hmc *HPMemberCreate) SetManuallyModified(jm *jsonfields.ManuallyModified) *HPMemberCreate
SetManuallyModified sets the "manually_modified" field.
func (hmc *HPMemberCreate) SetName(s string) *HPMemberCreate
SetName sets the "name" field.
func (hmc *HPMemberCreate) SetNameKana(s string) *HPMemberCreate
SetNameKana sets the "name_kana" field.
func (hmc *HPMemberCreate) SetNillableArtistID(i *int) *HPMemberCreate
SetNillableArtistID sets the "artist_id" field if the given value is not nil.
func (hmc *HPMemberCreate) SetNillableCrawledAt(t *time.Time) *HPMemberCreate
SetNillableCrawledAt sets the "crawled_at" field if the given value is not nil.
func (hmc *HPMemberCreate) SetNillableCreatedAt(t *time.Time) *HPMemberCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (hmc *HPMemberCreate) SetNillableErrorCount(i *int) *HPMemberCreate
SetNillableErrorCount sets the "error_count" field if the given value is not nil.
func (hmc *HPMemberCreate) SetNillableGraduateAt(t *time.Time) *HPMemberCreate
SetNillableGraduateAt sets the "graduate_at" field if the given value is not nil.
func (hmc *HPMemberCreate) SetNillableJoinAt(t *time.Time) *HPMemberCreate
SetNillableJoinAt sets the "join_at" field if the given value is not nil.
func (hmc *HPMemberCreate) SetNillableLastErrorMessage(s *string) *HPMemberCreate
SetNillableLastErrorMessage sets the "last_error_message" field if the given value is not nil.
func (hmc *HPMemberCreate) SetNillableRecrawlRequired(b *bool) *HPMemberCreate
SetNillableRecrawlRequired sets the "recrawl_required" field if the given value is not nil.
func (hmc *HPMemberCreate) SetNillableUpdatedAt(t *time.Time) *HPMemberCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hmc *HPMemberCreate) SetRecrawlRequired(b bool) *HPMemberCreate
SetRecrawlRequired sets the "recrawl_required" field.
func (hmc *HPMemberCreate) SetThumbnailURL(s string) *HPMemberCreate
SetThumbnailURL sets the "thumbnail_url" field.
func (hmc *HPMemberCreate) SetUpdatedAt(t time.Time) *HPMemberCreate
SetUpdatedAt sets the "updated_at" field.
HPMemberCreateBulk is the builder for creating many HPMember entities in bulk.
type HPMemberCreateBulk struct {
// contains filtered or unexported fields
}
func (hmcb *HPMemberCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (hmcb *HPMemberCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hmcb *HPMemberCreateBulk) OnConflict(opts ...sql.ConflictOption) *HPMemberUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPMember.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPMemberUpsert) {
SetCrawledAt(v+v).
}).
Exec(ctx)
func (hmcb *HPMemberCreateBulk) OnConflictColumns(columns ...string) *HPMemberUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPMember.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hmcb *HPMemberCreateBulk) Save(ctx context.Context) ([]*HPMember, error)
Save creates the HPMember entities in the database.
func (hmcb *HPMemberCreateBulk) SaveX(ctx context.Context) []*HPMember
SaveX is like Save, but panics if an error occurs.
HPMemberDelete is the builder for deleting a HPMember entity.
type HPMemberDelete struct {
// contains filtered or unexported fields
}
func (hmd *HPMemberDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (hmd *HPMemberDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (hmd *HPMemberDelete) Where(ps ...predicate.HPMember) *HPMemberDelete
Where appends a list predicates to the HPMemberDelete builder.
HPMemberDeleteOne is the builder for deleting a single HPMember entity.
type HPMemberDeleteOne struct {
// contains filtered or unexported fields
}
func (hmdo *HPMemberDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (hmdo *HPMemberDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hmdo *HPMemberDeleteOne) Where(ps ...predicate.HPMember) *HPMemberDeleteOne
Where appends a list predicates to the HPMemberDelete builder.
HPMemberEdge is the edge representation of HPMember.
type HPMemberEdge struct {
Node *HPMember `json:"node"`
Cursor Cursor `json:"cursor"`
}
HPMemberEdges holds the relations/edges for other nodes in the graph.
type HPMemberEdges struct {
// Assets holds the value of the assets edge.
Assets []*HPAsset `json:"assets,omitempty"`
// Artist holds the value of the artist edge.
Artist *HPArtist `json:"artist,omitempty"`
// OwningFeed holds the value of the owning_feed edge.
OwningFeed []*HPFeedItem `json:"owning_feed,omitempty"`
// TaggedFeed holds the value of the tagged_feed edge.
TaggedFeed []*HPFeedItem `json:"tagged_feed,omitempty"`
// OwningIgPosts holds the value of the owning_ig_posts edge.
OwningIgPosts []*HPIgPost `json:"owning_ig_posts,omitempty"`
// TaggedIgPosts holds the value of the tagged_ig_posts edge.
TaggedIgPosts []*HPIgPost `json:"tagged_ig_posts,omitempty"`
// OwningAmebloPosts holds the value of the owning_ameblo_posts edge.
OwningAmebloPosts []*HPAmebloPost `json:"owning_ameblo_posts,omitempty"`
// TaggedAmebloPosts holds the value of the tagged_ameblo_posts edge.
TaggedAmebloPosts []*HPAmebloPost `json:"tagged_ameblo_posts,omitempty"`
// TaggedElineupMallItems holds the value of the tagged_elineup_mall_items edge.
TaggedElineupMallItems []*HPElineupMallItem `json:"tagged_elineup_mall_items,omitempty"`
// FollowedBy holds the value of the followed_by edge.
FollowedBy []*HPFollow `json:"followed_by,omitempty"`
// contains filtered or unexported fields
}
func (e HPMemberEdges) ArtistOrErr() (*HPArtist, error)
ArtistOrErr returns the Artist value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (e HPMemberEdges) AssetsOrErr() ([]*HPAsset, error)
AssetsOrErr returns the Assets value or an error if the edge was not loaded in eager-loading.
func (e HPMemberEdges) FollowedByOrErr() ([]*HPFollow, error)
FollowedByOrErr returns the FollowedBy value or an error if the edge was not loaded in eager-loading.
func (e HPMemberEdges) OwningAmebloPostsOrErr() ([]*HPAmebloPost, error)
OwningAmebloPostsOrErr returns the OwningAmebloPosts value or an error if the edge was not loaded in eager-loading.
func (e HPMemberEdges) OwningFeedOrErr() ([]*HPFeedItem, error)
OwningFeedOrErr returns the OwningFeed value or an error if the edge was not loaded in eager-loading.
func (e HPMemberEdges) OwningIgPostsOrErr() ([]*HPIgPost, error)
OwningIgPostsOrErr returns the OwningIgPosts value or an error if the edge was not loaded in eager-loading.
func (e HPMemberEdges) TaggedAmebloPostsOrErr() ([]*HPAmebloPost, error)
TaggedAmebloPostsOrErr returns the TaggedAmebloPosts value or an error if the edge was not loaded in eager-loading.
func (e HPMemberEdges) TaggedElineupMallItemsOrErr() ([]*HPElineupMallItem, error)
TaggedElineupMallItemsOrErr returns the TaggedElineupMallItems value or an error if the edge was not loaded in eager-loading.
func (e HPMemberEdges) TaggedFeedOrErr() ([]*HPFeedItem, error)
TaggedFeedOrErr returns the TaggedFeed value or an error if the edge was not loaded in eager-loading.
func (e HPMemberEdges) TaggedIgPostsOrErr() ([]*HPIgPost, error)
TaggedIgPostsOrErr returns the TaggedIgPosts value or an error if the edge was not loaded in eager-loading.
HPMemberFilter provides a generic filtering capability at runtime for HPMemberQuery.
type HPMemberFilter struct {
// contains filtered or unexported fields
}
func (f *HPMemberFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *HPMemberFilter) WhereArtistID(p entql.IntP)
WhereArtistID applies the entql int predicate on the artist_id field.
func (f *HPMemberFilter) WhereArtistKey(p entql.StringP)
WhereArtistKey applies the entql string predicate on the artist_key field.
func (f *HPMemberFilter) WhereBloodType(p entql.StringP)
WhereBloodType applies the entql string predicate on the blood_type field.
func (f *HPMemberFilter) WhereCrawledAt(p entql.TimeP)
WhereCrawledAt applies the entql time.Time predicate on the crawled_at field.
func (f *HPMemberFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (f *HPMemberFilter) WhereDateOfBirth(p entql.TimeP)
WhereDateOfBirth applies the entql time.Time predicate on the date_of_birth field.
func (f *HPMemberFilter) WhereErrorCount(p entql.IntP)
WhereErrorCount applies the entql int predicate on the error_count field.
func (f *HPMemberFilter) WhereGraduateAt(p entql.TimeP)
WhereGraduateAt applies the entql time.Time predicate on the graduate_at field.
func (f *HPMemberFilter) WhereHasArtist()
WhereHasArtist applies a predicate to check if query has an edge artist.
func (f *HPMemberFilter) WhereHasArtistWith(preds ...predicate.HPArtist)
WhereHasArtistWith applies a predicate to check if query has an edge artist with a given conditions (other predicates).
func (f *HPMemberFilter) WhereHasAssets()
WhereHasAssets applies a predicate to check if query has an edge assets.
func (f *HPMemberFilter) WhereHasAssetsWith(preds ...predicate.HPAsset)
WhereHasAssetsWith applies a predicate to check if query has an edge assets with a given conditions (other predicates).
func (f *HPMemberFilter) WhereHasFollowedBy()
WhereHasFollowedBy applies a predicate to check if query has an edge followed_by.
func (f *HPMemberFilter) WhereHasFollowedByWith(preds ...predicate.HPFollow)
WhereHasFollowedByWith applies a predicate to check if query has an edge followed_by with a given conditions (other predicates).
func (f *HPMemberFilter) WhereHasOwningAmebloPosts()
WhereHasOwningAmebloPosts applies a predicate to check if query has an edge owning_ameblo_posts.
func (f *HPMemberFilter) WhereHasOwningAmebloPostsWith(preds ...predicate.HPAmebloPost)
WhereHasOwningAmebloPostsWith applies a predicate to check if query has an edge owning_ameblo_posts with a given conditions (other predicates).
func (f *HPMemberFilter) WhereHasOwningFeed()
WhereHasOwningFeed applies a predicate to check if query has an edge owning_feed.
func (f *HPMemberFilter) WhereHasOwningFeedWith(preds ...predicate.HPFeedItem)
WhereHasOwningFeedWith applies a predicate to check if query has an edge owning_feed with a given conditions (other predicates).
func (f *HPMemberFilter) WhereHasOwningIgPosts()
WhereHasOwningIgPosts applies a predicate to check if query has an edge owning_ig_posts.
func (f *HPMemberFilter) WhereHasOwningIgPostsWith(preds ...predicate.HPIgPost)
WhereHasOwningIgPostsWith applies a predicate to check if query has an edge owning_ig_posts with a given conditions (other predicates).
func (f *HPMemberFilter) WhereHasTaggedAmebloPosts()
WhereHasTaggedAmebloPosts applies a predicate to check if query has an edge tagged_ameblo_posts.
func (f *HPMemberFilter) WhereHasTaggedAmebloPostsWith(preds ...predicate.HPAmebloPost)
WhereHasTaggedAmebloPostsWith applies a predicate to check if query has an edge tagged_ameblo_posts with a given conditions (other predicates).
func (f *HPMemberFilter) WhereHasTaggedElineupMallItems()
WhereHasTaggedElineupMallItems applies a predicate to check if query has an edge tagged_elineup_mall_items.
func (f *HPMemberFilter) WhereHasTaggedElineupMallItemsWith(preds ...predicate.HPElineupMallItem)
WhereHasTaggedElineupMallItemsWith applies a predicate to check if query has an edge tagged_elineup_mall_items with a given conditions (other predicates).
func (f *HPMemberFilter) WhereHasTaggedFeed()
WhereHasTaggedFeed applies a predicate to check if query has an edge tagged_feed.
func (f *HPMemberFilter) WhereHasTaggedFeedWith(preds ...predicate.HPFeedItem)
WhereHasTaggedFeedWith applies a predicate to check if query has an edge tagged_feed with a given conditions (other predicates).
func (f *HPMemberFilter) WhereHasTaggedIgPosts()
WhereHasTaggedIgPosts applies a predicate to check if query has an edge tagged_ig_posts.
func (f *HPMemberFilter) WhereHasTaggedIgPostsWith(preds ...predicate.HPIgPost)
WhereHasTaggedIgPostsWith applies a predicate to check if query has an edge tagged_ig_posts with a given conditions (other predicates).
func (f *HPMemberFilter) WhereHometown(p entql.StringP)
WhereHometown applies the entql string predicate on the hometown field.
func (f *HPMemberFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *HPMemberFilter) WhereJoinAt(p entql.TimeP)
WhereJoinAt applies the entql time.Time predicate on the join_at field.
func (f *HPMemberFilter) WhereKey(p entql.StringP)
WhereKey applies the entql string predicate on the key field.
func (f *HPMemberFilter) WhereLastErrorMessage(p entql.StringP)
WhereLastErrorMessage applies the entql string predicate on the last_error_message field.
func (f *HPMemberFilter) WhereManuallyModified(p entql.BytesP)
WhereManuallyModified applies the entql json.RawMessage predicate on the manually_modified field.
func (f *HPMemberFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
func (f *HPMemberFilter) WhereNameKana(p entql.StringP)
WhereNameKana applies the entql string predicate on the name_kana field.
func (f *HPMemberFilter) WhereRecrawlRequired(p entql.BoolP)
WhereRecrawlRequired applies the entql bool predicate on the recrawl_required field.
func (f *HPMemberFilter) WhereThumbnailURL(p entql.StringP)
WhereThumbnailURL applies the entql string predicate on the thumbnail_url field.
func (f *HPMemberFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
HPMemberGroupBy is the group-by builder for HPMember entities.
type HPMemberGroupBy struct {
// contains filtered or unexported fields
}
func (hmgb *HPMemberGroupBy) Aggregate(fns ...AggregateFunc) *HPMemberGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *HPMemberGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPMemberGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPMemberGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPMemberGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPMemberGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPMemberGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPMemberGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPMemberGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPMemberGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPMemberGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPMemberGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPMemberGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hmgb *HPMemberGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPMemberGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPMemberGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPMemberGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPMemberGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPMemberGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPMemberMutation represents an operation that mutates the HPMember nodes in the graph.
type HPMemberMutation struct {
// contains filtered or unexported fields
}
func (m *HPMemberMutation) AddAssetIDs(ids ...int)
AddAssetIDs adds the "assets" edge to the HPAsset entity by ids.
func (m *HPMemberMutation) AddErrorCount(i int)
AddErrorCount adds i to the "error_count" field.
func (m *HPMemberMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPMemberMutation) AddFollowedByIDs(ids ...int)
AddFollowedByIDs adds the "followed_by" edge to the HPFollow entity by ids.
func (m *HPMemberMutation) AddOwningAmebloPostIDs(ids ...int)
AddOwningAmebloPostIDs adds the "owning_ameblo_posts" edge to the HPAmebloPost entity by ids.
func (m *HPMemberMutation) AddOwningFeedIDs(ids ...int)
AddOwningFeedIDs adds the "owning_feed" edge to the HPFeedItem entity by ids.
func (m *HPMemberMutation) AddOwningIgPostIDs(ids ...int)
AddOwningIgPostIDs adds the "owning_ig_posts" edge to the HPIgPost entity by ids.
func (m *HPMemberMutation) AddTaggedAmebloPostIDs(ids ...int)
AddTaggedAmebloPostIDs adds the "tagged_ameblo_posts" edge to the HPAmebloPost entity by ids.
func (m *HPMemberMutation) AddTaggedElineupMallItemIDs(ids ...int)
AddTaggedElineupMallItemIDs adds the "tagged_elineup_mall_items" edge to the HPElineupMallItem entity by ids.
func (m *HPMemberMutation) AddTaggedFeedIDs(ids ...int)
AddTaggedFeedIDs adds the "tagged_feed" edge to the HPFeedItem entity by ids.
func (m *HPMemberMutation) AddTaggedIgPostIDs(ids ...int)
AddTaggedIgPostIDs adds the "tagged_ig_posts" edge to the HPIgPost entity by ids.
func (m *HPMemberMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *HPMemberMutation) AddedErrorCount() (r int, exists bool)
AddedErrorCount returns the value that was added to the "error_count" field in this mutation.
func (m *HPMemberMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPMemberMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *HPMemberMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *HPMemberMutation) ArtistCleared() bool
ArtistCleared reports if the "artist" edge to the HPArtist entity was cleared.
func (m *HPMemberMutation) ArtistID() (r int, exists bool)
ArtistID returns the value of the "artist_id" field in the mutation.
func (m *HPMemberMutation) ArtistIDCleared() bool
ArtistIDCleared returns if the "artist_id" field was cleared in this mutation.
func (m *HPMemberMutation) ArtistIDs() (ids []int)
ArtistIDs returns the "artist" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ArtistID instead. It exists only for internal usage by the builders.
func (m *HPMemberMutation) ArtistKey() (r string, exists bool)
ArtistKey returns the value of the "artist_key" field in the mutation.
func (m *HPMemberMutation) AssetsCleared() bool
AssetsCleared reports if the "assets" edge to the HPAsset entity was cleared.
func (m *HPMemberMutation) AssetsIDs() (ids []int)
AssetsIDs returns the "assets" edge IDs in the mutation.
func (m *HPMemberMutation) BloodType() (r string, exists bool)
BloodType returns the value of the "blood_type" field in the mutation.
func (m *HPMemberMutation) ClearArtist()
ClearArtist clears the "artist" edge to the HPArtist entity.
func (m *HPMemberMutation) ClearArtistID()
ClearArtistID clears the value of the "artist_id" field.
func (m *HPMemberMutation) ClearAssets()
ClearAssets clears the "assets" edge to the HPAsset entity.
func (m *HPMemberMutation) ClearCrawledAt()
ClearCrawledAt clears the value of the "crawled_at" field.
func (m *HPMemberMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (m *HPMemberMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *HPMemberMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPMemberMutation) ClearFollowedBy()
ClearFollowedBy clears the "followed_by" edge to the HPFollow entity.
func (m *HPMemberMutation) ClearGraduateAt()
ClearGraduateAt clears the value of the "graduate_at" field.
func (m *HPMemberMutation) ClearJoinAt()
ClearJoinAt clears the value of the "join_at" field.
func (m *HPMemberMutation) ClearLastErrorMessage()
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (m *HPMemberMutation) ClearManuallyModified()
ClearManuallyModified clears the value of the "manually_modified" field.
func (m *HPMemberMutation) ClearOwningAmebloPosts()
ClearOwningAmebloPosts clears the "owning_ameblo_posts" edge to the HPAmebloPost entity.
func (m *HPMemberMutation) ClearOwningFeed()
ClearOwningFeed clears the "owning_feed" edge to the HPFeedItem entity.
func (m *HPMemberMutation) ClearOwningIgPosts()
ClearOwningIgPosts clears the "owning_ig_posts" edge to the HPIgPost entity.
func (m *HPMemberMutation) ClearRecrawlRequired()
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (m *HPMemberMutation) ClearTaggedAmebloPosts()
ClearTaggedAmebloPosts clears the "tagged_ameblo_posts" edge to the HPAmebloPost entity.
func (m *HPMemberMutation) ClearTaggedElineupMallItems()
ClearTaggedElineupMallItems clears the "tagged_elineup_mall_items" edge to the HPElineupMallItem entity.
func (m *HPMemberMutation) ClearTaggedFeed()
ClearTaggedFeed clears the "tagged_feed" edge to the HPFeedItem entity.
func (m *HPMemberMutation) ClearTaggedIgPosts()
ClearTaggedIgPosts clears the "tagged_ig_posts" edge to the HPIgPost entity.
func (m *HPMemberMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (m *HPMemberMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *HPMemberMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m HPMemberMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *HPMemberMutation) CrawledAt() (r time.Time, exists bool)
CrawledAt returns the value of the "crawled_at" field in the mutation.
func (m *HPMemberMutation) CrawledAtCleared() bool
CrawledAtCleared returns if the "crawled_at" field was cleared in this mutation.
func (m *HPMemberMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (m *HPMemberMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (m *HPMemberMutation) DateOfBirth() (r time.Time, exists bool)
DateOfBirth returns the value of the "date_of_birth" field in the mutation.
func (m *HPMemberMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *HPMemberMutation) ErrorCount() (r int, exists bool)
ErrorCount returns the value of the "error_count" field in the mutation.
func (m *HPMemberMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPMemberMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *HPMemberMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *HPMemberMutation) Filter() *HPMemberFilter
Filter returns an entql.Where implementation to apply filters on the HPMemberMutation builder.
func (m *HPMemberMutation) FollowedByCleared() bool
FollowedByCleared reports if the "followed_by" edge to the HPFollow entity was cleared.
func (m *HPMemberMutation) FollowedByIDs() (ids []int)
FollowedByIDs returns the "followed_by" edge IDs in the mutation.
func (m *HPMemberMutation) GraduateAt() (r time.Time, exists bool)
GraduateAt returns the value of the "graduate_at" field in the mutation.
func (m *HPMemberMutation) GraduateAtCleared() bool
GraduateAtCleared returns if the "graduate_at" field was cleared in this mutation.
func (m *HPMemberMutation) Hometown() (r string, exists bool)
Hometown returns the value of the "hometown" field in the mutation.
func (m *HPMemberMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *HPMemberMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *HPMemberMutation) JoinAt() (r time.Time, exists bool)
JoinAt returns the value of the "join_at" field in the mutation.
func (m *HPMemberMutation) JoinAtCleared() bool
JoinAtCleared returns if the "join_at" field was cleared in this mutation.
func (m *HPMemberMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (m *HPMemberMutation) LastErrorMessage() (r string, exists bool)
LastErrorMessage returns the value of the "last_error_message" field in the mutation.
func (m *HPMemberMutation) LastErrorMessageCleared() bool
LastErrorMessageCleared returns if the "last_error_message" field was cleared in this mutation.
func (m *HPMemberMutation) ManuallyModified() (r *jsonfields.ManuallyModified, exists bool)
ManuallyModified returns the value of the "manually_modified" field in the mutation.
func (m *HPMemberMutation) ManuallyModifiedCleared() bool
ManuallyModifiedCleared returns if the "manually_modified" field was cleared in this mutation.
func (m *HPMemberMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (m *HPMemberMutation) NameKana() (r string, exists bool)
NameKana returns the value of the "name_kana" field in the mutation.
func (m *HPMemberMutation) OldArtistID(ctx context.Context) (v *int, err error)
OldArtistID returns the old "artist_id" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldArtistKey(ctx context.Context) (v string, err error)
OldArtistKey returns the old "artist_key" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldBloodType(ctx context.Context) (v string, err error)
OldBloodType returns the old "blood_type" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldCrawledAt(ctx context.Context) (v *time.Time, err error)
OldCrawledAt returns the old "crawled_at" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
OldCreatedAt returns the old "created_at" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldDateOfBirth(ctx context.Context) (v time.Time, err error)
OldDateOfBirth returns the old "date_of_birth" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldErrorCount(ctx context.Context) (v int, err error)
OldErrorCount returns the old "error_count" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *HPMemberMutation) OldGraduateAt(ctx context.Context) (v *time.Time, err error)
OldGraduateAt returns the old "graduate_at" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldHometown(ctx context.Context) (v string, err error)
OldHometown returns the old "hometown" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldJoinAt(ctx context.Context) (v *time.Time, err error)
OldJoinAt returns the old "join_at" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldLastErrorMessage(ctx context.Context) (v *string, err error)
OldLastErrorMessage returns the old "last_error_message" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldManuallyModified(ctx context.Context) (v *jsonfields.ManuallyModified, err error)
OldManuallyModified returns the old "manually_modified" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldNameKana(ctx context.Context) (v string, err error)
OldNameKana returns the old "name_kana" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldRecrawlRequired(ctx context.Context) (v bool, err error)
OldRecrawlRequired returns the old "recrawl_required" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldThumbnailURL(ctx context.Context) (v string, err error)
OldThumbnailURL returns the old "thumbnail_url" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
OldUpdatedAt returns the old "updated_at" field's value of the HPMember entity. If the HPMember object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPMemberMutation) Op() Op
Op returns the operation name.
func (m *HPMemberMutation) OwningAmebloPostsCleared() bool
OwningAmebloPostsCleared reports if the "owning_ameblo_posts" edge to the HPAmebloPost entity was cleared.
func (m *HPMemberMutation) OwningAmebloPostsIDs() (ids []int)
OwningAmebloPostsIDs returns the "owning_ameblo_posts" edge IDs in the mutation.
func (m *HPMemberMutation) OwningFeedCleared() bool
OwningFeedCleared reports if the "owning_feed" edge to the HPFeedItem entity was cleared.
func (m *HPMemberMutation) OwningFeedIDs() (ids []int)
OwningFeedIDs returns the "owning_feed" edge IDs in the mutation.
func (m *HPMemberMutation) OwningIgPostsCleared() bool
OwningIgPostsCleared reports if the "owning_ig_posts" edge to the HPIgPost entity was cleared.
func (m *HPMemberMutation) OwningIgPostsIDs() (ids []int)
OwningIgPostsIDs returns the "owning_ig_posts" edge IDs in the mutation.
func (m *HPMemberMutation) RecrawlRequired() (r bool, exists bool)
RecrawlRequired returns the value of the "recrawl_required" field in the mutation.
func (m *HPMemberMutation) RecrawlRequiredCleared() bool
RecrawlRequiredCleared returns if the "recrawl_required" field was cleared in this mutation.
func (m *HPMemberMutation) RemoveAssetIDs(ids ...int)
RemoveAssetIDs removes the "assets" edge to the HPAsset entity by IDs.
func (m *HPMemberMutation) RemoveFollowedByIDs(ids ...int)
RemoveFollowedByIDs removes the "followed_by" edge to the HPFollow entity by IDs.
func (m *HPMemberMutation) RemoveOwningAmebloPostIDs(ids ...int)
RemoveOwningAmebloPostIDs removes the "owning_ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (m *HPMemberMutation) RemoveOwningFeedIDs(ids ...int)
RemoveOwningFeedIDs removes the "owning_feed" edge to the HPFeedItem entity by IDs.
func (m *HPMemberMutation) RemoveOwningIgPostIDs(ids ...int)
RemoveOwningIgPostIDs removes the "owning_ig_posts" edge to the HPIgPost entity by IDs.
func (m *HPMemberMutation) RemoveTaggedAmebloPostIDs(ids ...int)
RemoveTaggedAmebloPostIDs removes the "tagged_ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (m *HPMemberMutation) RemoveTaggedElineupMallItemIDs(ids ...int)
RemoveTaggedElineupMallItemIDs removes the "tagged_elineup_mall_items" edge to the HPElineupMallItem entity by IDs.
func (m *HPMemberMutation) RemoveTaggedFeedIDs(ids ...int)
RemoveTaggedFeedIDs removes the "tagged_feed" edge to the HPFeedItem entity by IDs.
func (m *HPMemberMutation) RemoveTaggedIgPostIDs(ids ...int)
RemoveTaggedIgPostIDs removes the "tagged_ig_posts" edge to the HPIgPost entity by IDs.
func (m *HPMemberMutation) RemovedAssetsIDs() (ids []int)
RemovedAssets returns the removed IDs of the "assets" edge to the HPAsset entity.
func (m *HPMemberMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *HPMemberMutation) RemovedFollowedByIDs() (ids []int)
RemovedFollowedBy returns the removed IDs of the "followed_by" edge to the HPFollow entity.
func (m *HPMemberMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *HPMemberMutation) RemovedOwningAmebloPostsIDs() (ids []int)
RemovedOwningAmebloPosts returns the removed IDs of the "owning_ameblo_posts" edge to the HPAmebloPost entity.
func (m *HPMemberMutation) RemovedOwningFeedIDs() (ids []int)
RemovedOwningFeed returns the removed IDs of the "owning_feed" edge to the HPFeedItem entity.
func (m *HPMemberMutation) RemovedOwningIgPostsIDs() (ids []int)
RemovedOwningIgPosts returns the removed IDs of the "owning_ig_posts" edge to the HPIgPost entity.
func (m *HPMemberMutation) RemovedTaggedAmebloPostsIDs() (ids []int)
RemovedTaggedAmebloPosts returns the removed IDs of the "tagged_ameblo_posts" edge to the HPAmebloPost entity.
func (m *HPMemberMutation) RemovedTaggedElineupMallItemsIDs() (ids []int)
RemovedTaggedElineupMallItems returns the removed IDs of the "tagged_elineup_mall_items" edge to the HPElineupMallItem entity.
func (m *HPMemberMutation) RemovedTaggedFeedIDs() (ids []int)
RemovedTaggedFeed returns the removed IDs of the "tagged_feed" edge to the HPFeedItem entity.
func (m *HPMemberMutation) RemovedTaggedIgPostsIDs() (ids []int)
RemovedTaggedIgPosts returns the removed IDs of the "tagged_ig_posts" edge to the HPIgPost entity.
func (m *HPMemberMutation) ResetArtist()
ResetArtist resets all changes to the "artist" edge.
func (m *HPMemberMutation) ResetArtistID()
ResetArtistID resets all changes to the "artist_id" field.
func (m *HPMemberMutation) ResetArtistKey()
ResetArtistKey resets all changes to the "artist_key" field.
func (m *HPMemberMutation) ResetAssets()
ResetAssets resets all changes to the "assets" edge.
func (m *HPMemberMutation) ResetBloodType()
ResetBloodType resets all changes to the "blood_type" field.
func (m *HPMemberMutation) ResetCrawledAt()
ResetCrawledAt resets all changes to the "crawled_at" field.
func (m *HPMemberMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (m *HPMemberMutation) ResetDateOfBirth()
ResetDateOfBirth resets all changes to the "date_of_birth" field.
func (m *HPMemberMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *HPMemberMutation) ResetErrorCount()
ResetErrorCount resets all changes to the "error_count" field.
func (m *HPMemberMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPMemberMutation) ResetFollowedBy()
ResetFollowedBy resets all changes to the "followed_by" edge.
func (m *HPMemberMutation) ResetGraduateAt()
ResetGraduateAt resets all changes to the "graduate_at" field.
func (m *HPMemberMutation) ResetHometown()
ResetHometown resets all changes to the "hometown" field.
func (m *HPMemberMutation) ResetJoinAt()
ResetJoinAt resets all changes to the "join_at" field.
func (m *HPMemberMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (m *HPMemberMutation) ResetLastErrorMessage()
ResetLastErrorMessage resets all changes to the "last_error_message" field.
func (m *HPMemberMutation) ResetManuallyModified()
ResetManuallyModified resets all changes to the "manually_modified" field.
func (m *HPMemberMutation) ResetName()
ResetName resets all changes to the "name" field.
func (m *HPMemberMutation) ResetNameKana()
ResetNameKana resets all changes to the "name_kana" field.
func (m *HPMemberMutation) ResetOwningAmebloPosts()
ResetOwningAmebloPosts resets all changes to the "owning_ameblo_posts" edge.
func (m *HPMemberMutation) ResetOwningFeed()
ResetOwningFeed resets all changes to the "owning_feed" edge.
func (m *HPMemberMutation) ResetOwningIgPosts()
ResetOwningIgPosts resets all changes to the "owning_ig_posts" edge.
func (m *HPMemberMutation) ResetRecrawlRequired()
ResetRecrawlRequired resets all changes to the "recrawl_required" field.
func (m *HPMemberMutation) ResetTaggedAmebloPosts()
ResetTaggedAmebloPosts resets all changes to the "tagged_ameblo_posts" edge.
func (m *HPMemberMutation) ResetTaggedElineupMallItems()
ResetTaggedElineupMallItems resets all changes to the "tagged_elineup_mall_items" edge.
func (m *HPMemberMutation) ResetTaggedFeed()
ResetTaggedFeed resets all changes to the "tagged_feed" edge.
func (m *HPMemberMutation) ResetTaggedIgPosts()
ResetTaggedIgPosts resets all changes to the "tagged_ig_posts" edge.
func (m *HPMemberMutation) ResetThumbnailURL()
ResetThumbnailURL resets all changes to the "thumbnail_url" field.
func (m *HPMemberMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (m *HPMemberMutation) SetArtistID(i int)
SetArtistID sets the "artist_id" field.
func (m *HPMemberMutation) SetArtistKey(s string)
SetArtistKey sets the "artist_key" field.
func (m *HPMemberMutation) SetBloodType(s string)
SetBloodType sets the "blood_type" field.
func (m *HPMemberMutation) SetCrawledAt(t time.Time)
SetCrawledAt sets the "crawled_at" field.
func (m *HPMemberMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (m *HPMemberMutation) SetDateOfBirth(t time.Time)
SetDateOfBirth sets the "date_of_birth" field.
func (m *HPMemberMutation) SetErrorCount(i int)
SetErrorCount sets the "error_count" field.
func (m *HPMemberMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPMemberMutation) SetGraduateAt(t time.Time)
SetGraduateAt sets the "graduate_at" field.
func (m *HPMemberMutation) SetHometown(s string)
SetHometown sets the "hometown" field.
func (m *HPMemberMutation) SetJoinAt(t time.Time)
SetJoinAt sets the "join_at" field.
func (m *HPMemberMutation) SetKey(s string)
SetKey sets the "key" field.
func (m *HPMemberMutation) SetLastErrorMessage(s string)
SetLastErrorMessage sets the "last_error_message" field.
func (m *HPMemberMutation) SetManuallyModified(jm *jsonfields.ManuallyModified)
SetManuallyModified sets the "manually_modified" field.
func (m *HPMemberMutation) SetName(s string)
SetName sets the "name" field.
func (m *HPMemberMutation) SetNameKana(s string)
SetNameKana sets the "name_kana" field.
func (m *HPMemberMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *HPMemberMutation) SetRecrawlRequired(b bool)
SetRecrawlRequired sets the "recrawl_required" field.
func (m *HPMemberMutation) SetThumbnailURL(s string)
SetThumbnailURL sets the "thumbnail_url" field.
func (m *HPMemberMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (m *HPMemberMutation) TaggedAmebloPostsCleared() bool
TaggedAmebloPostsCleared reports if the "tagged_ameblo_posts" edge to the HPAmebloPost entity was cleared.
func (m *HPMemberMutation) TaggedAmebloPostsIDs() (ids []int)
TaggedAmebloPostsIDs returns the "tagged_ameblo_posts" edge IDs in the mutation.
func (m *HPMemberMutation) TaggedElineupMallItemsCleared() bool
TaggedElineupMallItemsCleared reports if the "tagged_elineup_mall_items" edge to the HPElineupMallItem entity was cleared.
func (m *HPMemberMutation) TaggedElineupMallItemsIDs() (ids []int)
TaggedElineupMallItemsIDs returns the "tagged_elineup_mall_items" edge IDs in the mutation.
func (m *HPMemberMutation) TaggedFeedCleared() bool
TaggedFeedCleared reports if the "tagged_feed" edge to the HPFeedItem entity was cleared.
func (m *HPMemberMutation) TaggedFeedIDs() (ids []int)
TaggedFeedIDs returns the "tagged_feed" edge IDs in the mutation.
func (m *HPMemberMutation) TaggedIgPostsCleared() bool
TaggedIgPostsCleared reports if the "tagged_ig_posts" edge to the HPIgPost entity was cleared.
func (m *HPMemberMutation) TaggedIgPostsIDs() (ids []int)
TaggedIgPostsIDs returns the "tagged_ig_posts" edge IDs in the mutation.
func (m *HPMemberMutation) ThumbnailURL() (r string, exists bool)
ThumbnailURL returns the value of the "thumbnail_url" field in the mutation.
func (m HPMemberMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *HPMemberMutation) Type() string
Type returns the node type of this mutation (HPMember).
func (m *HPMemberMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (m *HPMemberMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (m *HPMemberMutation) Where(ps ...predicate.HPMember)
Where appends a list predicates to the HPMemberMutation builder.
func (m *HPMemberMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HPMemberMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
HPMemberOrder defines the ordering of HPMember.
type HPMemberOrder struct {
Direction OrderDirection `json:"direction"`
Field *HPMemberOrderField `json:"field"`
}
HPMemberOrderField defines the ordering field of HPMember.
type HPMemberOrderField struct {
// contains filtered or unexported fields
}
HPMemberPaginateOption enables pagination customization.
type HPMemberPaginateOption func(*hpmemberPager) error
func WithHPMemberFilter(filter func(*HPMemberQuery) (*HPMemberQuery, error)) HPMemberPaginateOption
WithHPMemberFilter configures pagination filter.
func WithHPMemberOrder(order *HPMemberOrder) HPMemberPaginateOption
WithHPMemberOrder configures pagination ordering.
HPMemberQuery is the builder for querying HPMember entities.
type HPMemberQuery struct {
// contains filtered or unexported fields
}
func (hmq *HPMemberQuery) Aggregate(fns ...AggregateFunc) *HPMemberSelect
Aggregate returns a HPMemberSelect configured with the given aggregations.
func (hmq *HPMemberQuery) All(ctx context.Context) ([]*HPMember, error)
All executes the query and returns a list of HPMembers.
func (hmq *HPMemberQuery) AllX(ctx context.Context) []*HPMember
AllX is like All, but panics if an error occurs.
func (hmq *HPMemberQuery) Clone() *HPMemberQuery
Clone returns a duplicate of the HPMemberQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (hm *HPMemberQuery) CollectFields(ctx context.Context, satisfies ...string) (*HPMemberQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (hmq *HPMemberQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (hmq *HPMemberQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (hmq *HPMemberQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (hmq *HPMemberQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (hmq *HPMemberQuery) Filter() *HPMemberFilter
Filter returns a Filter implementation to apply filters on the HPMemberQuery builder.
func (hmq *HPMemberQuery) First(ctx context.Context) (*HPMember, error)
First returns the first HPMember entity from the query. Returns a *NotFoundError when no HPMember was found.
func (hmq *HPMemberQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first HPMember ID from the query. Returns a *NotFoundError when no HPMember ID was found.
func (hmq *HPMemberQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (hmq *HPMemberQuery) FirstX(ctx context.Context) *HPMember
FirstX is like First, but panics if an error occurs.
func (hmq *HPMemberQuery) GroupBy(field string, fields ...string) *HPMemberGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CrawledAt time.Time `json:"crawled_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.HPMember.Query().
GroupBy(hpmember.FieldCrawledAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (hmq *HPMemberQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of HPMember IDs.
func (hmq *HPMemberQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (hmq *HPMemberQuery) Limit(limit int) *HPMemberQuery
Limit the number of records to be returned by this query.
func (hmq *HPMemberQuery) Offset(offset int) *HPMemberQuery
Offset to start from.
func (hmq *HPMemberQuery) Only(ctx context.Context) (*HPMember, error)
Only returns a single HPMember entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HPMember entity is found. Returns a *NotFoundError when no HPMember entities are found.
func (hmq *HPMemberQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only HPMember ID in the query. Returns a *NotSingularError when more than one HPMember ID is found. Returns a *NotFoundError when no entities are found.
func (hmq *HPMemberQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (hmq *HPMemberQuery) OnlyX(ctx context.Context) *HPMember
OnlyX is like Only, but panics if an error occurs.
func (hmq *HPMemberQuery) Order(o ...hpmember.Order) *HPMemberQuery
Order specifies how the records should be ordered.
func (hm *HPMemberQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...HPMemberPaginateOption, ) (*HPMemberConnection, error)
Paginate executes the query and returns a relay based cursor connection to HPMember.
func (hmq *HPMemberQuery) QueryArtist() *HPArtistQuery
QueryArtist chains the current query on the "artist" edge.
func (hmq *HPMemberQuery) QueryAssets() *HPAssetQuery
QueryAssets chains the current query on the "assets" edge.
func (hmq *HPMemberQuery) QueryFollowedBy() *HPFollowQuery
QueryFollowedBy chains the current query on the "followed_by" edge.
func (hmq *HPMemberQuery) QueryOwningAmebloPosts() *HPAmebloPostQuery
QueryOwningAmebloPosts chains the current query on the "owning_ameblo_posts" edge.
func (hmq *HPMemberQuery) QueryOwningFeed() *HPFeedItemQuery
QueryOwningFeed chains the current query on the "owning_feed" edge.
func (hmq *HPMemberQuery) QueryOwningIgPosts() *HPIgPostQuery
QueryOwningIgPosts chains the current query on the "owning_ig_posts" edge.
func (hmq *HPMemberQuery) QueryTaggedAmebloPosts() *HPAmebloPostQuery
QueryTaggedAmebloPosts chains the current query on the "tagged_ameblo_posts" edge.
func (hmq *HPMemberQuery) QueryTaggedElineupMallItems() *HPElineupMallItemQuery
QueryTaggedElineupMallItems chains the current query on the "tagged_elineup_mall_items" edge.
func (hmq *HPMemberQuery) QueryTaggedFeed() *HPFeedItemQuery
QueryTaggedFeed chains the current query on the "tagged_feed" edge.
func (hmq *HPMemberQuery) QueryTaggedIgPosts() *HPIgPostQuery
QueryTaggedIgPosts chains the current query on the "tagged_ig_posts" edge.
func (hmq *HPMemberQuery) Select(fields ...string) *HPMemberSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CrawledAt time.Time `json:"crawled_at,omitempty"`
}
client.HPMember.Query().
Select(hpmember.FieldCrawledAt).
Scan(ctx, &v)
func (hmq *HPMemberQuery) Unique(unique bool) *HPMemberQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (hmq *HPMemberQuery) Where(ps ...predicate.HPMember) *HPMemberQuery
Where adds a new predicate for the HPMemberQuery builder.
func (hmq *HPMemberQuery) WithArtist(opts ...func(*HPArtistQuery)) *HPMemberQuery
WithArtist tells the query-builder to eager-load the nodes that are connected to the "artist" edge. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithAssets(opts ...func(*HPAssetQuery)) *HPMemberQuery
WithAssets tells the query-builder to eager-load the nodes that are connected to the "assets" edge. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithFollowedBy(opts ...func(*HPFollowQuery)) *HPMemberQuery
WithFollowedBy tells the query-builder to eager-load the nodes that are connected to the "followed_by" edge. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithNamedAssets(name string, opts ...func(*HPAssetQuery)) *HPMemberQuery
WithNamedAssets tells the query-builder to eager-load the nodes that are connected to the "assets" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithNamedFollowedBy(name string, opts ...func(*HPFollowQuery)) *HPMemberQuery
WithNamedFollowedBy tells the query-builder to eager-load the nodes that are connected to the "followed_by" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithNamedOwningAmebloPosts(name string, opts ...func(*HPAmebloPostQuery)) *HPMemberQuery
WithNamedOwningAmebloPosts tells the query-builder to eager-load the nodes that are connected to the "owning_ameblo_posts" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithNamedOwningFeed(name string, opts ...func(*HPFeedItemQuery)) *HPMemberQuery
WithNamedOwningFeed tells the query-builder to eager-load the nodes that are connected to the "owning_feed" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithNamedOwningIgPosts(name string, opts ...func(*HPIgPostQuery)) *HPMemberQuery
WithNamedOwningIgPosts tells the query-builder to eager-load the nodes that are connected to the "owning_ig_posts" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithNamedTaggedAmebloPosts(name string, opts ...func(*HPAmebloPostQuery)) *HPMemberQuery
WithNamedTaggedAmebloPosts tells the query-builder to eager-load the nodes that are connected to the "tagged_ameblo_posts" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithNamedTaggedElineupMallItems(name string, opts ...func(*HPElineupMallItemQuery)) *HPMemberQuery
WithNamedTaggedElineupMallItems tells the query-builder to eager-load the nodes that are connected to the "tagged_elineup_mall_items" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithNamedTaggedFeed(name string, opts ...func(*HPFeedItemQuery)) *HPMemberQuery
WithNamedTaggedFeed tells the query-builder to eager-load the nodes that are connected to the "tagged_feed" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithNamedTaggedIgPosts(name string, opts ...func(*HPIgPostQuery)) *HPMemberQuery
WithNamedTaggedIgPosts tells the query-builder to eager-load the nodes that are connected to the "tagged_ig_posts" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithOwningAmebloPosts(opts ...func(*HPAmebloPostQuery)) *HPMemberQuery
WithOwningAmebloPosts tells the query-builder to eager-load the nodes that are connected to the "owning_ameblo_posts" edge. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithOwningFeed(opts ...func(*HPFeedItemQuery)) *HPMemberQuery
WithOwningFeed tells the query-builder to eager-load the nodes that are connected to the "owning_feed" edge. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithOwningIgPosts(opts ...func(*HPIgPostQuery)) *HPMemberQuery
WithOwningIgPosts tells the query-builder to eager-load the nodes that are connected to the "owning_ig_posts" edge. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithTaggedAmebloPosts(opts ...func(*HPAmebloPostQuery)) *HPMemberQuery
WithTaggedAmebloPosts tells the query-builder to eager-load the nodes that are connected to the "tagged_ameblo_posts" edge. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithTaggedElineupMallItems(opts ...func(*HPElineupMallItemQuery)) *HPMemberQuery
WithTaggedElineupMallItems tells the query-builder to eager-load the nodes that are connected to the "tagged_elineup_mall_items" edge. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithTaggedFeed(opts ...func(*HPFeedItemQuery)) *HPMemberQuery
WithTaggedFeed tells the query-builder to eager-load the nodes that are connected to the "tagged_feed" edge. The optional arguments are used to configure the query builder of the edge.
func (hmq *HPMemberQuery) WithTaggedIgPosts(opts ...func(*HPIgPostQuery)) *HPMemberQuery
WithTaggedIgPosts tells the query-builder to eager-load the nodes that are connected to the "tagged_ig_posts" edge. The optional arguments are used to configure the query builder of the edge.
HPMemberSelect is the builder for selecting fields of HPMember entities.
type HPMemberSelect struct {
*HPMemberQuery
// contains filtered or unexported fields
}
func (hms *HPMemberSelect) Aggregate(fns ...AggregateFunc) *HPMemberSelect
Aggregate adds the given aggregation functions to the selector query.
func (s *HPMemberSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPMemberSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPMemberSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPMemberSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPMemberSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPMemberSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPMemberSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPMemberSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPMemberSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPMemberSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPMemberSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPMemberSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hms *HPMemberSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPMemberSelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPMemberSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPMemberSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPMemberSelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPMemberSelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPMemberUpdate is the builder for updating HPMember entities.
type HPMemberUpdate struct {
// contains filtered or unexported fields
}
func (hmu *HPMemberUpdate) AddAssetIDs(ids ...int) *HPMemberUpdate
AddAssetIDs adds the "assets" edge to the HPAsset entity by IDs.
func (hmu *HPMemberUpdate) AddAssets(h ...*HPAsset) *HPMemberUpdate
AddAssets adds the "assets" edges to the HPAsset entity.
func (hmu *HPMemberUpdate) AddErrorCount(i int) *HPMemberUpdate
AddErrorCount adds i to the "error_count" field.
func (hmu *HPMemberUpdate) AddFollowedBy(h ...*HPFollow) *HPMemberUpdate
AddFollowedBy adds the "followed_by" edges to the HPFollow entity.
func (hmu *HPMemberUpdate) AddFollowedByIDs(ids ...int) *HPMemberUpdate
AddFollowedByIDs adds the "followed_by" edge to the HPFollow entity by IDs.
func (hmu *HPMemberUpdate) AddOwningAmebloPostIDs(ids ...int) *HPMemberUpdate
AddOwningAmebloPostIDs adds the "owning_ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hmu *HPMemberUpdate) AddOwningAmebloPosts(h ...*HPAmebloPost) *HPMemberUpdate
AddOwningAmebloPosts adds the "owning_ameblo_posts" edges to the HPAmebloPost entity.
func (hmu *HPMemberUpdate) AddOwningFeed(h ...*HPFeedItem) *HPMemberUpdate
AddOwningFeed adds the "owning_feed" edges to the HPFeedItem entity.
func (hmu *HPMemberUpdate) AddOwningFeedIDs(ids ...int) *HPMemberUpdate
AddOwningFeedIDs adds the "owning_feed" edge to the HPFeedItem entity by IDs.
func (hmu *HPMemberUpdate) AddOwningIgPostIDs(ids ...int) *HPMemberUpdate
AddOwningIgPostIDs adds the "owning_ig_posts" edge to the HPIgPost entity by IDs.
func (hmu *HPMemberUpdate) AddOwningIgPosts(h ...*HPIgPost) *HPMemberUpdate
AddOwningIgPosts adds the "owning_ig_posts" edges to the HPIgPost entity.
func (hmu *HPMemberUpdate) AddTaggedAmebloPostIDs(ids ...int) *HPMemberUpdate
AddTaggedAmebloPostIDs adds the "tagged_ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hmu *HPMemberUpdate) AddTaggedAmebloPosts(h ...*HPAmebloPost) *HPMemberUpdate
AddTaggedAmebloPosts adds the "tagged_ameblo_posts" edges to the HPAmebloPost entity.
func (hmu *HPMemberUpdate) AddTaggedElineupMallItemIDs(ids ...int) *HPMemberUpdate
AddTaggedElineupMallItemIDs adds the "tagged_elineup_mall_items" edge to the HPElineupMallItem entity by IDs.
func (hmu *HPMemberUpdate) AddTaggedElineupMallItems(h ...*HPElineupMallItem) *HPMemberUpdate
AddTaggedElineupMallItems adds the "tagged_elineup_mall_items" edges to the HPElineupMallItem entity.
func (hmu *HPMemberUpdate) AddTaggedFeed(h ...*HPFeedItem) *HPMemberUpdate
AddTaggedFeed adds the "tagged_feed" edges to the HPFeedItem entity.
func (hmu *HPMemberUpdate) AddTaggedFeedIDs(ids ...int) *HPMemberUpdate
AddTaggedFeedIDs adds the "tagged_feed" edge to the HPFeedItem entity by IDs.
func (hmu *HPMemberUpdate) AddTaggedIgPostIDs(ids ...int) *HPMemberUpdate
AddTaggedIgPostIDs adds the "tagged_ig_posts" edge to the HPIgPost entity by IDs.
func (hmu *HPMemberUpdate) AddTaggedIgPosts(h ...*HPIgPost) *HPMemberUpdate
AddTaggedIgPosts adds the "tagged_ig_posts" edges to the HPIgPost entity.
func (hmu *HPMemberUpdate) ClearArtist() *HPMemberUpdate
ClearArtist clears the "artist" edge to the HPArtist entity.
func (hmu *HPMemberUpdate) ClearArtistID() *HPMemberUpdate
ClearArtistID clears the value of the "artist_id" field.
func (hmu *HPMemberUpdate) ClearAssets() *HPMemberUpdate
ClearAssets clears all "assets" edges to the HPAsset entity.
func (hmu *HPMemberUpdate) ClearCrawledAt() *HPMemberUpdate
ClearCrawledAt clears the value of the "crawled_at" field.
func (hmu *HPMemberUpdate) ClearFollowedBy() *HPMemberUpdate
ClearFollowedBy clears all "followed_by" edges to the HPFollow entity.
func (hmu *HPMemberUpdate) ClearGraduateAt() *HPMemberUpdate
ClearGraduateAt clears the value of the "graduate_at" field.
func (hmu *HPMemberUpdate) ClearJoinAt() *HPMemberUpdate
ClearJoinAt clears the value of the "join_at" field.
func (hmu *HPMemberUpdate) ClearLastErrorMessage() *HPMemberUpdate
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (hmu *HPMemberUpdate) ClearManuallyModified() *HPMemberUpdate
ClearManuallyModified clears the value of the "manually_modified" field.
func (hmu *HPMemberUpdate) ClearOwningAmebloPosts() *HPMemberUpdate
ClearOwningAmebloPosts clears all "owning_ameblo_posts" edges to the HPAmebloPost entity.
func (hmu *HPMemberUpdate) ClearOwningFeed() *HPMemberUpdate
ClearOwningFeed clears all "owning_feed" edges to the HPFeedItem entity.
func (hmu *HPMemberUpdate) ClearOwningIgPosts() *HPMemberUpdate
ClearOwningIgPosts clears all "owning_ig_posts" edges to the HPIgPost entity.
func (hmu *HPMemberUpdate) ClearRecrawlRequired() *HPMemberUpdate
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (hmu *HPMemberUpdate) ClearTaggedAmebloPosts() *HPMemberUpdate
ClearTaggedAmebloPosts clears all "tagged_ameblo_posts" edges to the HPAmebloPost entity.
func (hmu *HPMemberUpdate) ClearTaggedElineupMallItems() *HPMemberUpdate
ClearTaggedElineupMallItems clears all "tagged_elineup_mall_items" edges to the HPElineupMallItem entity.
func (hmu *HPMemberUpdate) ClearTaggedFeed() *HPMemberUpdate
ClearTaggedFeed clears all "tagged_feed" edges to the HPFeedItem entity.
func (hmu *HPMemberUpdate) ClearTaggedIgPosts() *HPMemberUpdate
ClearTaggedIgPosts clears all "tagged_ig_posts" edges to the HPIgPost entity.
func (hmu *HPMemberUpdate) ClearUpdatedAt() *HPMemberUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (hmu *HPMemberUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (hmu *HPMemberUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hmu *HPMemberUpdate) Mutation() *HPMemberMutation
Mutation returns the HPMemberMutation object of the builder.
func (hmu *HPMemberUpdate) RemoveAssetIDs(ids ...int) *HPMemberUpdate
RemoveAssetIDs removes the "assets" edge to HPAsset entities by IDs.
func (hmu *HPMemberUpdate) RemoveAssets(h ...*HPAsset) *HPMemberUpdate
RemoveAssets removes "assets" edges to HPAsset entities.
func (hmu *HPMemberUpdate) RemoveFollowedBy(h ...*HPFollow) *HPMemberUpdate
RemoveFollowedBy removes "followed_by" edges to HPFollow entities.
func (hmu *HPMemberUpdate) RemoveFollowedByIDs(ids ...int) *HPMemberUpdate
RemoveFollowedByIDs removes the "followed_by" edge to HPFollow entities by IDs.
func (hmu *HPMemberUpdate) RemoveOwningAmebloPostIDs(ids ...int) *HPMemberUpdate
RemoveOwningAmebloPostIDs removes the "owning_ameblo_posts" edge to HPAmebloPost entities by IDs.
func (hmu *HPMemberUpdate) RemoveOwningAmebloPosts(h ...*HPAmebloPost) *HPMemberUpdate
RemoveOwningAmebloPosts removes "owning_ameblo_posts" edges to HPAmebloPost entities.
func (hmu *HPMemberUpdate) RemoveOwningFeed(h ...*HPFeedItem) *HPMemberUpdate
RemoveOwningFeed removes "owning_feed" edges to HPFeedItem entities.
func (hmu *HPMemberUpdate) RemoveOwningFeedIDs(ids ...int) *HPMemberUpdate
RemoveOwningFeedIDs removes the "owning_feed" edge to HPFeedItem entities by IDs.
func (hmu *HPMemberUpdate) RemoveOwningIgPostIDs(ids ...int) *HPMemberUpdate
RemoveOwningIgPostIDs removes the "owning_ig_posts" edge to HPIgPost entities by IDs.
func (hmu *HPMemberUpdate) RemoveOwningIgPosts(h ...*HPIgPost) *HPMemberUpdate
RemoveOwningIgPosts removes "owning_ig_posts" edges to HPIgPost entities.
func (hmu *HPMemberUpdate) RemoveTaggedAmebloPostIDs(ids ...int) *HPMemberUpdate
RemoveTaggedAmebloPostIDs removes the "tagged_ameblo_posts" edge to HPAmebloPost entities by IDs.
func (hmu *HPMemberUpdate) RemoveTaggedAmebloPosts(h ...*HPAmebloPost) *HPMemberUpdate
RemoveTaggedAmebloPosts removes "tagged_ameblo_posts" edges to HPAmebloPost entities.
func (hmu *HPMemberUpdate) RemoveTaggedElineupMallItemIDs(ids ...int) *HPMemberUpdate
RemoveTaggedElineupMallItemIDs removes the "tagged_elineup_mall_items" edge to HPElineupMallItem entities by IDs.
func (hmu *HPMemberUpdate) RemoveTaggedElineupMallItems(h ...*HPElineupMallItem) *HPMemberUpdate
RemoveTaggedElineupMallItems removes "tagged_elineup_mall_items" edges to HPElineupMallItem entities.
func (hmu *HPMemberUpdate) RemoveTaggedFeed(h ...*HPFeedItem) *HPMemberUpdate
RemoveTaggedFeed removes "tagged_feed" edges to HPFeedItem entities.
func (hmu *HPMemberUpdate) RemoveTaggedFeedIDs(ids ...int) *HPMemberUpdate
RemoveTaggedFeedIDs removes the "tagged_feed" edge to HPFeedItem entities by IDs.
func (hmu *HPMemberUpdate) RemoveTaggedIgPostIDs(ids ...int) *HPMemberUpdate
RemoveTaggedIgPostIDs removes the "tagged_ig_posts" edge to HPIgPost entities by IDs.
func (hmu *HPMemberUpdate) RemoveTaggedIgPosts(h ...*HPIgPost) *HPMemberUpdate
RemoveTaggedIgPosts removes "tagged_ig_posts" edges to HPIgPost entities.
func (hmu *HPMemberUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (hmu *HPMemberUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (hmu *HPMemberUpdate) SetArtist(h *HPArtist) *HPMemberUpdate
SetArtist sets the "artist" edge to the HPArtist entity.
func (hmu *HPMemberUpdate) SetArtistID(i int) *HPMemberUpdate
SetArtistID sets the "artist_id" field.
func (hmu *HPMemberUpdate) SetArtistKey(s string) *HPMemberUpdate
SetArtistKey sets the "artist_key" field.
func (hmu *HPMemberUpdate) SetBloodType(s string) *HPMemberUpdate
SetBloodType sets the "blood_type" field.
func (hmu *HPMemberUpdate) SetCrawledAt(t time.Time) *HPMemberUpdate
SetCrawledAt sets the "crawled_at" field.
func (hmu *HPMemberUpdate) SetDateOfBirth(t time.Time) *HPMemberUpdate
SetDateOfBirth sets the "date_of_birth" field.
func (hmu *HPMemberUpdate) SetErrorCount(i int) *HPMemberUpdate
SetErrorCount sets the "error_count" field.
func (hmu *HPMemberUpdate) SetGraduateAt(t time.Time) *HPMemberUpdate
SetGraduateAt sets the "graduate_at" field.
func (hmu *HPMemberUpdate) SetHometown(s string) *HPMemberUpdate
SetHometown sets the "hometown" field.
func (hmu *HPMemberUpdate) SetJoinAt(t time.Time) *HPMemberUpdate
SetJoinAt sets the "join_at" field.
func (hmu *HPMemberUpdate) SetKey(s string) *HPMemberUpdate
SetKey sets the "key" field.
func (hmu *HPMemberUpdate) SetLastErrorMessage(s string) *HPMemberUpdate
SetLastErrorMessage sets the "last_error_message" field.
func (hmu *HPMemberUpdate) SetManuallyModified(jm *jsonfields.ManuallyModified) *HPMemberUpdate
SetManuallyModified sets the "manually_modified" field.
func (hmu *HPMemberUpdate) SetName(s string) *HPMemberUpdate
SetName sets the "name" field.
func (hmu *HPMemberUpdate) SetNameKana(s string) *HPMemberUpdate
SetNameKana sets the "name_kana" field.
func (hmu *HPMemberUpdate) SetNillableArtistID(i *int) *HPMemberUpdate
SetNillableArtistID sets the "artist_id" field if the given value is not nil.
func (hmu *HPMemberUpdate) SetNillableCrawledAt(t *time.Time) *HPMemberUpdate
SetNillableCrawledAt sets the "crawled_at" field if the given value is not nil.
func (hmu *HPMemberUpdate) SetNillableErrorCount(i *int) *HPMemberUpdate
SetNillableErrorCount sets the "error_count" field if the given value is not nil.
func (hmu *HPMemberUpdate) SetNillableGraduateAt(t *time.Time) *HPMemberUpdate
SetNillableGraduateAt sets the "graduate_at" field if the given value is not nil.
func (hmu *HPMemberUpdate) SetNillableJoinAt(t *time.Time) *HPMemberUpdate
SetNillableJoinAt sets the "join_at" field if the given value is not nil.
func (hmu *HPMemberUpdate) SetNillableLastErrorMessage(s *string) *HPMemberUpdate
SetNillableLastErrorMessage sets the "last_error_message" field if the given value is not nil.
func (hmu *HPMemberUpdate) SetNillableRecrawlRequired(b *bool) *HPMemberUpdate
SetNillableRecrawlRequired sets the "recrawl_required" field if the given value is not nil.
func (hmu *HPMemberUpdate) SetNillableUpdatedAt(t *time.Time) *HPMemberUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hmu *HPMemberUpdate) SetRecrawlRequired(b bool) *HPMemberUpdate
SetRecrawlRequired sets the "recrawl_required" field.
func (hmu *HPMemberUpdate) SetThumbnailURL(s string) *HPMemberUpdate
SetThumbnailURL sets the "thumbnail_url" field.
func (hmu *HPMemberUpdate) SetUpdatedAt(t time.Time) *HPMemberUpdate
SetUpdatedAt sets the "updated_at" field.
func (hmu *HPMemberUpdate) Where(ps ...predicate.HPMember) *HPMemberUpdate
Where appends a list predicates to the HPMemberUpdate builder.
HPMemberUpdateOne is the builder for updating a single HPMember entity.
type HPMemberUpdateOne struct {
// contains filtered or unexported fields
}
func (hmuo *HPMemberUpdateOne) AddAssetIDs(ids ...int) *HPMemberUpdateOne
AddAssetIDs adds the "assets" edge to the HPAsset entity by IDs.
func (hmuo *HPMemberUpdateOne) AddAssets(h ...*HPAsset) *HPMemberUpdateOne
AddAssets adds the "assets" edges to the HPAsset entity.
func (hmuo *HPMemberUpdateOne) AddErrorCount(i int) *HPMemberUpdateOne
AddErrorCount adds i to the "error_count" field.
func (hmuo *HPMemberUpdateOne) AddFollowedBy(h ...*HPFollow) *HPMemberUpdateOne
AddFollowedBy adds the "followed_by" edges to the HPFollow entity.
func (hmuo *HPMemberUpdateOne) AddFollowedByIDs(ids ...int) *HPMemberUpdateOne
AddFollowedByIDs adds the "followed_by" edge to the HPFollow entity by IDs.
func (hmuo *HPMemberUpdateOne) AddOwningAmebloPostIDs(ids ...int) *HPMemberUpdateOne
AddOwningAmebloPostIDs adds the "owning_ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hmuo *HPMemberUpdateOne) AddOwningAmebloPosts(h ...*HPAmebloPost) *HPMemberUpdateOne
AddOwningAmebloPosts adds the "owning_ameblo_posts" edges to the HPAmebloPost entity.
func (hmuo *HPMemberUpdateOne) AddOwningFeed(h ...*HPFeedItem) *HPMemberUpdateOne
AddOwningFeed adds the "owning_feed" edges to the HPFeedItem entity.
func (hmuo *HPMemberUpdateOne) AddOwningFeedIDs(ids ...int) *HPMemberUpdateOne
AddOwningFeedIDs adds the "owning_feed" edge to the HPFeedItem entity by IDs.
func (hmuo *HPMemberUpdateOne) AddOwningIgPostIDs(ids ...int) *HPMemberUpdateOne
AddOwningIgPostIDs adds the "owning_ig_posts" edge to the HPIgPost entity by IDs.
func (hmuo *HPMemberUpdateOne) AddOwningIgPosts(h ...*HPIgPost) *HPMemberUpdateOne
AddOwningIgPosts adds the "owning_ig_posts" edges to the HPIgPost entity.
func (hmuo *HPMemberUpdateOne) AddTaggedAmebloPostIDs(ids ...int) *HPMemberUpdateOne
AddTaggedAmebloPostIDs adds the "tagged_ameblo_posts" edge to the HPAmebloPost entity by IDs.
func (hmuo *HPMemberUpdateOne) AddTaggedAmebloPosts(h ...*HPAmebloPost) *HPMemberUpdateOne
AddTaggedAmebloPosts adds the "tagged_ameblo_posts" edges to the HPAmebloPost entity.
func (hmuo *HPMemberUpdateOne) AddTaggedElineupMallItemIDs(ids ...int) *HPMemberUpdateOne
AddTaggedElineupMallItemIDs adds the "tagged_elineup_mall_items" edge to the HPElineupMallItem entity by IDs.
func (hmuo *HPMemberUpdateOne) AddTaggedElineupMallItems(h ...*HPElineupMallItem) *HPMemberUpdateOne
AddTaggedElineupMallItems adds the "tagged_elineup_mall_items" edges to the HPElineupMallItem entity.
func (hmuo *HPMemberUpdateOne) AddTaggedFeed(h ...*HPFeedItem) *HPMemberUpdateOne
AddTaggedFeed adds the "tagged_feed" edges to the HPFeedItem entity.
func (hmuo *HPMemberUpdateOne) AddTaggedFeedIDs(ids ...int) *HPMemberUpdateOne
AddTaggedFeedIDs adds the "tagged_feed" edge to the HPFeedItem entity by IDs.
func (hmuo *HPMemberUpdateOne) AddTaggedIgPostIDs(ids ...int) *HPMemberUpdateOne
AddTaggedIgPostIDs adds the "tagged_ig_posts" edge to the HPIgPost entity by IDs.
func (hmuo *HPMemberUpdateOne) AddTaggedIgPosts(h ...*HPIgPost) *HPMemberUpdateOne
AddTaggedIgPosts adds the "tagged_ig_posts" edges to the HPIgPost entity.
func (hmuo *HPMemberUpdateOne) ClearArtist() *HPMemberUpdateOne
ClearArtist clears the "artist" edge to the HPArtist entity.
func (hmuo *HPMemberUpdateOne) ClearArtistID() *HPMemberUpdateOne
ClearArtistID clears the value of the "artist_id" field.
func (hmuo *HPMemberUpdateOne) ClearAssets() *HPMemberUpdateOne
ClearAssets clears all "assets" edges to the HPAsset entity.
func (hmuo *HPMemberUpdateOne) ClearCrawledAt() *HPMemberUpdateOne
ClearCrawledAt clears the value of the "crawled_at" field.
func (hmuo *HPMemberUpdateOne) ClearFollowedBy() *HPMemberUpdateOne
ClearFollowedBy clears all "followed_by" edges to the HPFollow entity.
func (hmuo *HPMemberUpdateOne) ClearGraduateAt() *HPMemberUpdateOne
ClearGraduateAt clears the value of the "graduate_at" field.
func (hmuo *HPMemberUpdateOne) ClearJoinAt() *HPMemberUpdateOne
ClearJoinAt clears the value of the "join_at" field.
func (hmuo *HPMemberUpdateOne) ClearLastErrorMessage() *HPMemberUpdateOne
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (hmuo *HPMemberUpdateOne) ClearManuallyModified() *HPMemberUpdateOne
ClearManuallyModified clears the value of the "manually_modified" field.
func (hmuo *HPMemberUpdateOne) ClearOwningAmebloPosts() *HPMemberUpdateOne
ClearOwningAmebloPosts clears all "owning_ameblo_posts" edges to the HPAmebloPost entity.
func (hmuo *HPMemberUpdateOne) ClearOwningFeed() *HPMemberUpdateOne
ClearOwningFeed clears all "owning_feed" edges to the HPFeedItem entity.
func (hmuo *HPMemberUpdateOne) ClearOwningIgPosts() *HPMemberUpdateOne
ClearOwningIgPosts clears all "owning_ig_posts" edges to the HPIgPost entity.
func (hmuo *HPMemberUpdateOne) ClearRecrawlRequired() *HPMemberUpdateOne
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (hmuo *HPMemberUpdateOne) ClearTaggedAmebloPosts() *HPMemberUpdateOne
ClearTaggedAmebloPosts clears all "tagged_ameblo_posts" edges to the HPAmebloPost entity.
func (hmuo *HPMemberUpdateOne) ClearTaggedElineupMallItems() *HPMemberUpdateOne
ClearTaggedElineupMallItems clears all "tagged_elineup_mall_items" edges to the HPElineupMallItem entity.
func (hmuo *HPMemberUpdateOne) ClearTaggedFeed() *HPMemberUpdateOne
ClearTaggedFeed clears all "tagged_feed" edges to the HPFeedItem entity.
func (hmuo *HPMemberUpdateOne) ClearTaggedIgPosts() *HPMemberUpdateOne
ClearTaggedIgPosts clears all "tagged_ig_posts" edges to the HPIgPost entity.
func (hmuo *HPMemberUpdateOne) ClearUpdatedAt() *HPMemberUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (hmuo *HPMemberUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (hmuo *HPMemberUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hmuo *HPMemberUpdateOne) Mutation() *HPMemberMutation
Mutation returns the HPMemberMutation object of the builder.
func (hmuo *HPMemberUpdateOne) RemoveAssetIDs(ids ...int) *HPMemberUpdateOne
RemoveAssetIDs removes the "assets" edge to HPAsset entities by IDs.
func (hmuo *HPMemberUpdateOne) RemoveAssets(h ...*HPAsset) *HPMemberUpdateOne
RemoveAssets removes "assets" edges to HPAsset entities.
func (hmuo *HPMemberUpdateOne) RemoveFollowedBy(h ...*HPFollow) *HPMemberUpdateOne
RemoveFollowedBy removes "followed_by" edges to HPFollow entities.
func (hmuo *HPMemberUpdateOne) RemoveFollowedByIDs(ids ...int) *HPMemberUpdateOne
RemoveFollowedByIDs removes the "followed_by" edge to HPFollow entities by IDs.
func (hmuo *HPMemberUpdateOne) RemoveOwningAmebloPostIDs(ids ...int) *HPMemberUpdateOne
RemoveOwningAmebloPostIDs removes the "owning_ameblo_posts" edge to HPAmebloPost entities by IDs.
func (hmuo *HPMemberUpdateOne) RemoveOwningAmebloPosts(h ...*HPAmebloPost) *HPMemberUpdateOne
RemoveOwningAmebloPosts removes "owning_ameblo_posts" edges to HPAmebloPost entities.
func (hmuo *HPMemberUpdateOne) RemoveOwningFeed(h ...*HPFeedItem) *HPMemberUpdateOne
RemoveOwningFeed removes "owning_feed" edges to HPFeedItem entities.
func (hmuo *HPMemberUpdateOne) RemoveOwningFeedIDs(ids ...int) *HPMemberUpdateOne
RemoveOwningFeedIDs removes the "owning_feed" edge to HPFeedItem entities by IDs.
func (hmuo *HPMemberUpdateOne) RemoveOwningIgPostIDs(ids ...int) *HPMemberUpdateOne
RemoveOwningIgPostIDs removes the "owning_ig_posts" edge to HPIgPost entities by IDs.
func (hmuo *HPMemberUpdateOne) RemoveOwningIgPosts(h ...*HPIgPost) *HPMemberUpdateOne
RemoveOwningIgPosts removes "owning_ig_posts" edges to HPIgPost entities.
func (hmuo *HPMemberUpdateOne) RemoveTaggedAmebloPostIDs(ids ...int) *HPMemberUpdateOne
RemoveTaggedAmebloPostIDs removes the "tagged_ameblo_posts" edge to HPAmebloPost entities by IDs.
func (hmuo *HPMemberUpdateOne) RemoveTaggedAmebloPosts(h ...*HPAmebloPost) *HPMemberUpdateOne
RemoveTaggedAmebloPosts removes "tagged_ameblo_posts" edges to HPAmebloPost entities.
func (hmuo *HPMemberUpdateOne) RemoveTaggedElineupMallItemIDs(ids ...int) *HPMemberUpdateOne
RemoveTaggedElineupMallItemIDs removes the "tagged_elineup_mall_items" edge to HPElineupMallItem entities by IDs.
func (hmuo *HPMemberUpdateOne) RemoveTaggedElineupMallItems(h ...*HPElineupMallItem) *HPMemberUpdateOne
RemoveTaggedElineupMallItems removes "tagged_elineup_mall_items" edges to HPElineupMallItem entities.
func (hmuo *HPMemberUpdateOne) RemoveTaggedFeed(h ...*HPFeedItem) *HPMemberUpdateOne
RemoveTaggedFeed removes "tagged_feed" edges to HPFeedItem entities.
func (hmuo *HPMemberUpdateOne) RemoveTaggedFeedIDs(ids ...int) *HPMemberUpdateOne
RemoveTaggedFeedIDs removes the "tagged_feed" edge to HPFeedItem entities by IDs.
func (hmuo *HPMemberUpdateOne) RemoveTaggedIgPostIDs(ids ...int) *HPMemberUpdateOne
RemoveTaggedIgPostIDs removes the "tagged_ig_posts" edge to HPIgPost entities by IDs.
func (hmuo *HPMemberUpdateOne) RemoveTaggedIgPosts(h ...*HPIgPost) *HPMemberUpdateOne
RemoveTaggedIgPosts removes "tagged_ig_posts" edges to HPIgPost entities.
func (hmuo *HPMemberUpdateOne) Save(ctx context.Context) (*HPMember, error)
Save executes the query and returns the updated HPMember entity.
func (hmuo *HPMemberUpdateOne) SaveX(ctx context.Context) *HPMember
SaveX is like Save, but panics if an error occurs.
func (hmuo *HPMemberUpdateOne) Select(field string, fields ...string) *HPMemberUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (hmuo *HPMemberUpdateOne) SetArtist(h *HPArtist) *HPMemberUpdateOne
SetArtist sets the "artist" edge to the HPArtist entity.
func (hmuo *HPMemberUpdateOne) SetArtistID(i int) *HPMemberUpdateOne
SetArtistID sets the "artist_id" field.
func (hmuo *HPMemberUpdateOne) SetArtistKey(s string) *HPMemberUpdateOne
SetArtistKey sets the "artist_key" field.
func (hmuo *HPMemberUpdateOne) SetBloodType(s string) *HPMemberUpdateOne
SetBloodType sets the "blood_type" field.
func (hmuo *HPMemberUpdateOne) SetCrawledAt(t time.Time) *HPMemberUpdateOne
SetCrawledAt sets the "crawled_at" field.
func (hmuo *HPMemberUpdateOne) SetDateOfBirth(t time.Time) *HPMemberUpdateOne
SetDateOfBirth sets the "date_of_birth" field.
func (hmuo *HPMemberUpdateOne) SetErrorCount(i int) *HPMemberUpdateOne
SetErrorCount sets the "error_count" field.
func (hmuo *HPMemberUpdateOne) SetGraduateAt(t time.Time) *HPMemberUpdateOne
SetGraduateAt sets the "graduate_at" field.
func (hmuo *HPMemberUpdateOne) SetHometown(s string) *HPMemberUpdateOne
SetHometown sets the "hometown" field.
func (hmuo *HPMemberUpdateOne) SetJoinAt(t time.Time) *HPMemberUpdateOne
SetJoinAt sets the "join_at" field.
func (hmuo *HPMemberUpdateOne) SetKey(s string) *HPMemberUpdateOne
SetKey sets the "key" field.
func (hmuo *HPMemberUpdateOne) SetLastErrorMessage(s string) *HPMemberUpdateOne
SetLastErrorMessage sets the "last_error_message" field.
func (hmuo *HPMemberUpdateOne) SetManuallyModified(jm *jsonfields.ManuallyModified) *HPMemberUpdateOne
SetManuallyModified sets the "manually_modified" field.
func (hmuo *HPMemberUpdateOne) SetName(s string) *HPMemberUpdateOne
SetName sets the "name" field.
func (hmuo *HPMemberUpdateOne) SetNameKana(s string) *HPMemberUpdateOne
SetNameKana sets the "name_kana" field.
func (hmuo *HPMemberUpdateOne) SetNillableArtistID(i *int) *HPMemberUpdateOne
SetNillableArtistID sets the "artist_id" field if the given value is not nil.
func (hmuo *HPMemberUpdateOne) SetNillableCrawledAt(t *time.Time) *HPMemberUpdateOne
SetNillableCrawledAt sets the "crawled_at" field if the given value is not nil.
func (hmuo *HPMemberUpdateOne) SetNillableErrorCount(i *int) *HPMemberUpdateOne
SetNillableErrorCount sets the "error_count" field if the given value is not nil.
func (hmuo *HPMemberUpdateOne) SetNillableGraduateAt(t *time.Time) *HPMemberUpdateOne
SetNillableGraduateAt sets the "graduate_at" field if the given value is not nil.
func (hmuo *HPMemberUpdateOne) SetNillableJoinAt(t *time.Time) *HPMemberUpdateOne
SetNillableJoinAt sets the "join_at" field if the given value is not nil.
func (hmuo *HPMemberUpdateOne) SetNillableLastErrorMessage(s *string) *HPMemberUpdateOne
SetNillableLastErrorMessage sets the "last_error_message" field if the given value is not nil.
func (hmuo *HPMemberUpdateOne) SetNillableRecrawlRequired(b *bool) *HPMemberUpdateOne
SetNillableRecrawlRequired sets the "recrawl_required" field if the given value is not nil.
func (hmuo *HPMemberUpdateOne) SetNillableUpdatedAt(t *time.Time) *HPMemberUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hmuo *HPMemberUpdateOne) SetRecrawlRequired(b bool) *HPMemberUpdateOne
SetRecrawlRequired sets the "recrawl_required" field.
func (hmuo *HPMemberUpdateOne) SetThumbnailURL(s string) *HPMemberUpdateOne
SetThumbnailURL sets the "thumbnail_url" field.
func (hmuo *HPMemberUpdateOne) SetUpdatedAt(t time.Time) *HPMemberUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (hmuo *HPMemberUpdateOne) Where(ps ...predicate.HPMember) *HPMemberUpdateOne
Where appends a list predicates to the HPMemberUpdate builder.
HPMemberUpsert is the "OnConflict" setter.
type HPMemberUpsert struct {
*sql.UpdateSet
}
func (u *HPMemberUpsert) AddErrorCount(v int) *HPMemberUpsert
AddErrorCount adds v to the "error_count" field.
func (u *HPMemberUpsert) ClearArtistID() *HPMemberUpsert
ClearArtistID clears the value of the "artist_id" field.
func (u *HPMemberUpsert) ClearCrawledAt() *HPMemberUpsert
ClearCrawledAt clears the value of the "crawled_at" field.
func (u *HPMemberUpsert) ClearGraduateAt() *HPMemberUpsert
ClearGraduateAt clears the value of the "graduate_at" field.
func (u *HPMemberUpsert) ClearJoinAt() *HPMemberUpsert
ClearJoinAt clears the value of the "join_at" field.
func (u *HPMemberUpsert) ClearLastErrorMessage() *HPMemberUpsert
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (u *HPMemberUpsert) ClearManuallyModified() *HPMemberUpsert
ClearManuallyModified clears the value of the "manually_modified" field.
func (u *HPMemberUpsert) ClearRecrawlRequired() *HPMemberUpsert
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (u *HPMemberUpsert) ClearUpdatedAt() *HPMemberUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPMemberUpsert) SetArtistID(v int) *HPMemberUpsert
SetArtistID sets the "artist_id" field.
func (u *HPMemberUpsert) SetArtistKey(v string) *HPMemberUpsert
SetArtistKey sets the "artist_key" field.
func (u *HPMemberUpsert) SetBloodType(v string) *HPMemberUpsert
SetBloodType sets the "blood_type" field.
func (u *HPMemberUpsert) SetCrawledAt(v time.Time) *HPMemberUpsert
SetCrawledAt sets the "crawled_at" field.
func (u *HPMemberUpsert) SetDateOfBirth(v time.Time) *HPMemberUpsert
SetDateOfBirth sets the "date_of_birth" field.
func (u *HPMemberUpsert) SetErrorCount(v int) *HPMemberUpsert
SetErrorCount sets the "error_count" field.
func (u *HPMemberUpsert) SetGraduateAt(v time.Time) *HPMemberUpsert
SetGraduateAt sets the "graduate_at" field.
func (u *HPMemberUpsert) SetHometown(v string) *HPMemberUpsert
SetHometown sets the "hometown" field.
func (u *HPMemberUpsert) SetJoinAt(v time.Time) *HPMemberUpsert
SetJoinAt sets the "join_at" field.
func (u *HPMemberUpsert) SetKey(v string) *HPMemberUpsert
SetKey sets the "key" field.
func (u *HPMemberUpsert) SetLastErrorMessage(v string) *HPMemberUpsert
SetLastErrorMessage sets the "last_error_message" field.
func (u *HPMemberUpsert) SetManuallyModified(v *jsonfields.ManuallyModified) *HPMemberUpsert
SetManuallyModified sets the "manually_modified" field.
func (u *HPMemberUpsert) SetName(v string) *HPMemberUpsert
SetName sets the "name" field.
func (u *HPMemberUpsert) SetNameKana(v string) *HPMemberUpsert
SetNameKana sets the "name_kana" field.
func (u *HPMemberUpsert) SetRecrawlRequired(v bool) *HPMemberUpsert
SetRecrawlRequired sets the "recrawl_required" field.
func (u *HPMemberUpsert) SetThumbnailURL(v string) *HPMemberUpsert
SetThumbnailURL sets the "thumbnail_url" field.
func (u *HPMemberUpsert) SetUpdatedAt(v time.Time) *HPMemberUpsert
SetUpdatedAt sets the "updated_at" field.
func (u *HPMemberUpsert) UpdateArtistID() *HPMemberUpsert
UpdateArtistID sets the "artist_id" field to the value that was provided on create.
func (u *HPMemberUpsert) UpdateArtistKey() *HPMemberUpsert
UpdateArtistKey sets the "artist_key" field to the value that was provided on create.
func (u *HPMemberUpsert) UpdateBloodType() *HPMemberUpsert
UpdateBloodType sets the "blood_type" field to the value that was provided on create.
func (u *HPMemberUpsert) UpdateCrawledAt() *HPMemberUpsert
UpdateCrawledAt sets the "crawled_at" field to the value that was provided on create.
func (u *HPMemberUpsert) UpdateDateOfBirth() *HPMemberUpsert
UpdateDateOfBirth sets the "date_of_birth" field to the value that was provided on create.
func (u *HPMemberUpsert) UpdateErrorCount() *HPMemberUpsert
UpdateErrorCount sets the "error_count" field to the value that was provided on create.
func (u *HPMemberUpsert) UpdateGraduateAt() *HPMemberUpsert
UpdateGraduateAt sets the "graduate_at" field to the value that was provided on create.
func (u *HPMemberUpsert) UpdateHometown() *HPMemberUpsert
UpdateHometown sets the "hometown" field to the value that was provided on create.
func (u *HPMemberUpsert) UpdateJoinAt() *HPMemberUpsert
UpdateJoinAt sets the "join_at" field to the value that was provided on create.
func (u *HPMemberUpsert) UpdateKey() *HPMemberUpsert
UpdateKey sets the "key" field to the value that was provided on create.
func (u *HPMemberUpsert) UpdateLastErrorMessage() *HPMemberUpsert
UpdateLastErrorMessage sets the "last_error_message" field to the value that was provided on create.
func (u *HPMemberUpsert) UpdateManuallyModified() *HPMemberUpsert
UpdateManuallyModified sets the "manually_modified" field to the value that was provided on create.
func (u *HPMemberUpsert) UpdateName() *HPMemberUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (u *HPMemberUpsert) UpdateNameKana() *HPMemberUpsert
UpdateNameKana sets the "name_kana" field to the value that was provided on create.
func (u *HPMemberUpsert) UpdateRecrawlRequired() *HPMemberUpsert
UpdateRecrawlRequired sets the "recrawl_required" field to the value that was provided on create.
func (u *HPMemberUpsert) UpdateThumbnailURL() *HPMemberUpsert
UpdateThumbnailURL sets the "thumbnail_url" field to the value that was provided on create.
func (u *HPMemberUpsert) UpdateUpdatedAt() *HPMemberUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPMemberUpsertBulk is the builder for "upsert"-ing a bulk of HPMember nodes.
type HPMemberUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *HPMemberUpsertBulk) AddErrorCount(v int) *HPMemberUpsertBulk
AddErrorCount adds v to the "error_count" field.
func (u *HPMemberUpsertBulk) ClearArtistID() *HPMemberUpsertBulk
ClearArtistID clears the value of the "artist_id" field.
func (u *HPMemberUpsertBulk) ClearCrawledAt() *HPMemberUpsertBulk
ClearCrawledAt clears the value of the "crawled_at" field.
func (u *HPMemberUpsertBulk) ClearGraduateAt() *HPMemberUpsertBulk
ClearGraduateAt clears the value of the "graduate_at" field.
func (u *HPMemberUpsertBulk) ClearJoinAt() *HPMemberUpsertBulk
ClearJoinAt clears the value of the "join_at" field.
func (u *HPMemberUpsertBulk) ClearLastErrorMessage() *HPMemberUpsertBulk
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (u *HPMemberUpsertBulk) ClearManuallyModified() *HPMemberUpsertBulk
ClearManuallyModified clears the value of the "manually_modified" field.
func (u *HPMemberUpsertBulk) ClearRecrawlRequired() *HPMemberUpsertBulk
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (u *HPMemberUpsertBulk) ClearUpdatedAt() *HPMemberUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPMemberUpsertBulk) DoNothing() *HPMemberUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPMemberUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPMemberUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPMemberUpsertBulk) Ignore() *HPMemberUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPMember.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *HPMemberUpsertBulk) SetArtistID(v int) *HPMemberUpsertBulk
SetArtistID sets the "artist_id" field.
func (u *HPMemberUpsertBulk) SetArtistKey(v string) *HPMemberUpsertBulk
SetArtistKey sets the "artist_key" field.
func (u *HPMemberUpsertBulk) SetBloodType(v string) *HPMemberUpsertBulk
SetBloodType sets the "blood_type" field.
func (u *HPMemberUpsertBulk) SetCrawledAt(v time.Time) *HPMemberUpsertBulk
SetCrawledAt sets the "crawled_at" field.
func (u *HPMemberUpsertBulk) SetDateOfBirth(v time.Time) *HPMemberUpsertBulk
SetDateOfBirth sets the "date_of_birth" field.
func (u *HPMemberUpsertBulk) SetErrorCount(v int) *HPMemberUpsertBulk
SetErrorCount sets the "error_count" field.
func (u *HPMemberUpsertBulk) SetGraduateAt(v time.Time) *HPMemberUpsertBulk
SetGraduateAt sets the "graduate_at" field.
func (u *HPMemberUpsertBulk) SetHometown(v string) *HPMemberUpsertBulk
SetHometown sets the "hometown" field.
func (u *HPMemberUpsertBulk) SetJoinAt(v time.Time) *HPMemberUpsertBulk
SetJoinAt sets the "join_at" field.
func (u *HPMemberUpsertBulk) SetKey(v string) *HPMemberUpsertBulk
SetKey sets the "key" field.
func (u *HPMemberUpsertBulk) SetLastErrorMessage(v string) *HPMemberUpsertBulk
SetLastErrorMessage sets the "last_error_message" field.
func (u *HPMemberUpsertBulk) SetManuallyModified(v *jsonfields.ManuallyModified) *HPMemberUpsertBulk
SetManuallyModified sets the "manually_modified" field.
func (u *HPMemberUpsertBulk) SetName(v string) *HPMemberUpsertBulk
SetName sets the "name" field.
func (u *HPMemberUpsertBulk) SetNameKana(v string) *HPMemberUpsertBulk
SetNameKana sets the "name_kana" field.
func (u *HPMemberUpsertBulk) SetRecrawlRequired(v bool) *HPMemberUpsertBulk
SetRecrawlRequired sets the "recrawl_required" field.
func (u *HPMemberUpsertBulk) SetThumbnailURL(v string) *HPMemberUpsertBulk
SetThumbnailURL sets the "thumbnail_url" field.
func (u *HPMemberUpsertBulk) SetUpdatedAt(v time.Time) *HPMemberUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (u *HPMemberUpsertBulk) Update(set func(*HPMemberUpsert)) *HPMemberUpsertBulk
Update allows overriding fields `UPDATE` values. See the HPMemberCreateBulk.OnConflict documentation for more info.
func (u *HPMemberUpsertBulk) UpdateArtistID() *HPMemberUpsertBulk
UpdateArtistID sets the "artist_id" field to the value that was provided on create.
func (u *HPMemberUpsertBulk) UpdateArtistKey() *HPMemberUpsertBulk
UpdateArtistKey sets the "artist_key" field to the value that was provided on create.
func (u *HPMemberUpsertBulk) UpdateBloodType() *HPMemberUpsertBulk
UpdateBloodType sets the "blood_type" field to the value that was provided on create.
func (u *HPMemberUpsertBulk) UpdateCrawledAt() *HPMemberUpsertBulk
UpdateCrawledAt sets the "crawled_at" field to the value that was provided on create.
func (u *HPMemberUpsertBulk) UpdateDateOfBirth() *HPMemberUpsertBulk
UpdateDateOfBirth sets the "date_of_birth" field to the value that was provided on create.
func (u *HPMemberUpsertBulk) UpdateErrorCount() *HPMemberUpsertBulk
UpdateErrorCount sets the "error_count" field to the value that was provided on create.
func (u *HPMemberUpsertBulk) UpdateGraduateAt() *HPMemberUpsertBulk
UpdateGraduateAt sets the "graduate_at" field to the value that was provided on create.
func (u *HPMemberUpsertBulk) UpdateHometown() *HPMemberUpsertBulk
UpdateHometown sets the "hometown" field to the value that was provided on create.
func (u *HPMemberUpsertBulk) UpdateJoinAt() *HPMemberUpsertBulk
UpdateJoinAt sets the "join_at" field to the value that was provided on create.
func (u *HPMemberUpsertBulk) UpdateKey() *HPMemberUpsertBulk
UpdateKey sets the "key" field to the value that was provided on create.
func (u *HPMemberUpsertBulk) UpdateLastErrorMessage() *HPMemberUpsertBulk
UpdateLastErrorMessage sets the "last_error_message" field to the value that was provided on create.
func (u *HPMemberUpsertBulk) UpdateManuallyModified() *HPMemberUpsertBulk
UpdateManuallyModified sets the "manually_modified" field to the value that was provided on create.
func (u *HPMemberUpsertBulk) UpdateName() *HPMemberUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (u *HPMemberUpsertBulk) UpdateNameKana() *HPMemberUpsertBulk
UpdateNameKana sets the "name_kana" field to the value that was provided on create.
func (u *HPMemberUpsertBulk) UpdateNewValues() *HPMemberUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPMember.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPMemberUpsertBulk) UpdateRecrawlRequired() *HPMemberUpsertBulk
UpdateRecrawlRequired sets the "recrawl_required" field to the value that was provided on create.
func (u *HPMemberUpsertBulk) UpdateThumbnailURL() *HPMemberUpsertBulk
UpdateThumbnailURL sets the "thumbnail_url" field to the value that was provided on create.
func (u *HPMemberUpsertBulk) UpdateUpdatedAt() *HPMemberUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPMemberUpsertOne is the builder for "upsert"-ing
one HPMember node.
type HPMemberUpsertOne struct {
// contains filtered or unexported fields
}
func (u *HPMemberUpsertOne) AddErrorCount(v int) *HPMemberUpsertOne
AddErrorCount adds v to the "error_count" field.
func (u *HPMemberUpsertOne) ClearArtistID() *HPMemberUpsertOne
ClearArtistID clears the value of the "artist_id" field.
func (u *HPMemberUpsertOne) ClearCrawledAt() *HPMemberUpsertOne
ClearCrawledAt clears the value of the "crawled_at" field.
func (u *HPMemberUpsertOne) ClearGraduateAt() *HPMemberUpsertOne
ClearGraduateAt clears the value of the "graduate_at" field.
func (u *HPMemberUpsertOne) ClearJoinAt() *HPMemberUpsertOne
ClearJoinAt clears the value of the "join_at" field.
func (u *HPMemberUpsertOne) ClearLastErrorMessage() *HPMemberUpsertOne
ClearLastErrorMessage clears the value of the "last_error_message" field.
func (u *HPMemberUpsertOne) ClearManuallyModified() *HPMemberUpsertOne
ClearManuallyModified clears the value of the "manually_modified" field.
func (u *HPMemberUpsertOne) ClearRecrawlRequired() *HPMemberUpsertOne
ClearRecrawlRequired clears the value of the "recrawl_required" field.
func (u *HPMemberUpsertOne) ClearUpdatedAt() *HPMemberUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPMemberUpsertOne) DoNothing() *HPMemberUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPMemberUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPMemberUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPMemberUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *HPMemberUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *HPMemberUpsertOne) Ignore() *HPMemberUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPMember.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *HPMemberUpsertOne) SetArtistID(v int) *HPMemberUpsertOne
SetArtistID sets the "artist_id" field.
func (u *HPMemberUpsertOne) SetArtistKey(v string) *HPMemberUpsertOne
SetArtistKey sets the "artist_key" field.
func (u *HPMemberUpsertOne) SetBloodType(v string) *HPMemberUpsertOne
SetBloodType sets the "blood_type" field.
func (u *HPMemberUpsertOne) SetCrawledAt(v time.Time) *HPMemberUpsertOne
SetCrawledAt sets the "crawled_at" field.
func (u *HPMemberUpsertOne) SetDateOfBirth(v time.Time) *HPMemberUpsertOne
SetDateOfBirth sets the "date_of_birth" field.
func (u *HPMemberUpsertOne) SetErrorCount(v int) *HPMemberUpsertOne
SetErrorCount sets the "error_count" field.
func (u *HPMemberUpsertOne) SetGraduateAt(v time.Time) *HPMemberUpsertOne
SetGraduateAt sets the "graduate_at" field.
func (u *HPMemberUpsertOne) SetHometown(v string) *HPMemberUpsertOne
SetHometown sets the "hometown" field.
func (u *HPMemberUpsertOne) SetJoinAt(v time.Time) *HPMemberUpsertOne
SetJoinAt sets the "join_at" field.
func (u *HPMemberUpsertOne) SetKey(v string) *HPMemberUpsertOne
SetKey sets the "key" field.
func (u *HPMemberUpsertOne) SetLastErrorMessage(v string) *HPMemberUpsertOne
SetLastErrorMessage sets the "last_error_message" field.
func (u *HPMemberUpsertOne) SetManuallyModified(v *jsonfields.ManuallyModified) *HPMemberUpsertOne
SetManuallyModified sets the "manually_modified" field.
func (u *HPMemberUpsertOne) SetName(v string) *HPMemberUpsertOne
SetName sets the "name" field.
func (u *HPMemberUpsertOne) SetNameKana(v string) *HPMemberUpsertOne
SetNameKana sets the "name_kana" field.
func (u *HPMemberUpsertOne) SetRecrawlRequired(v bool) *HPMemberUpsertOne
SetRecrawlRequired sets the "recrawl_required" field.
func (u *HPMemberUpsertOne) SetThumbnailURL(v string) *HPMemberUpsertOne
SetThumbnailURL sets the "thumbnail_url" field.
func (u *HPMemberUpsertOne) SetUpdatedAt(v time.Time) *HPMemberUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (u *HPMemberUpsertOne) Update(set func(*HPMemberUpsert)) *HPMemberUpsertOne
Update allows overriding fields `UPDATE` values. See the HPMemberCreate.OnConflict documentation for more info.
func (u *HPMemberUpsertOne) UpdateArtistID() *HPMemberUpsertOne
UpdateArtistID sets the "artist_id" field to the value that was provided on create.
func (u *HPMemberUpsertOne) UpdateArtistKey() *HPMemberUpsertOne
UpdateArtistKey sets the "artist_key" field to the value that was provided on create.
func (u *HPMemberUpsertOne) UpdateBloodType() *HPMemberUpsertOne
UpdateBloodType sets the "blood_type" field to the value that was provided on create.
func (u *HPMemberUpsertOne) UpdateCrawledAt() *HPMemberUpsertOne
UpdateCrawledAt sets the "crawled_at" field to the value that was provided on create.
func (u *HPMemberUpsertOne) UpdateDateOfBirth() *HPMemberUpsertOne
UpdateDateOfBirth sets the "date_of_birth" field to the value that was provided on create.
func (u *HPMemberUpsertOne) UpdateErrorCount() *HPMemberUpsertOne
UpdateErrorCount sets the "error_count" field to the value that was provided on create.
func (u *HPMemberUpsertOne) UpdateGraduateAt() *HPMemberUpsertOne
UpdateGraduateAt sets the "graduate_at" field to the value that was provided on create.
func (u *HPMemberUpsertOne) UpdateHometown() *HPMemberUpsertOne
UpdateHometown sets the "hometown" field to the value that was provided on create.
func (u *HPMemberUpsertOne) UpdateJoinAt() *HPMemberUpsertOne
UpdateJoinAt sets the "join_at" field to the value that was provided on create.
func (u *HPMemberUpsertOne) UpdateKey() *HPMemberUpsertOne
UpdateKey sets the "key" field to the value that was provided on create.
func (u *HPMemberUpsertOne) UpdateLastErrorMessage() *HPMemberUpsertOne
UpdateLastErrorMessage sets the "last_error_message" field to the value that was provided on create.
func (u *HPMemberUpsertOne) UpdateManuallyModified() *HPMemberUpsertOne
UpdateManuallyModified sets the "manually_modified" field to the value that was provided on create.
func (u *HPMemberUpsertOne) UpdateName() *HPMemberUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (u *HPMemberUpsertOne) UpdateNameKana() *HPMemberUpsertOne
UpdateNameKana sets the "name_kana" field to the value that was provided on create.
func (u *HPMemberUpsertOne) UpdateNewValues() *HPMemberUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPMember.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPMemberUpsertOne) UpdateRecrawlRequired() *HPMemberUpsertOne
UpdateRecrawlRequired sets the "recrawl_required" field to the value that was provided on create.
func (u *HPMemberUpsertOne) UpdateThumbnailURL() *HPMemberUpsertOne
UpdateThumbnailURL sets the "thumbnail_url" field to the value that was provided on create.
func (u *HPMemberUpsertOne) UpdateUpdatedAt() *HPMemberUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPMembers is a parsable slice of HPMember.
type HPMembers []*HPMember
HPSortHistories is a parsable slice of HPSortHistory.
type HPSortHistories []*HPSortHistory
HPSortHistory is the model entity for the HPSortHistory schema.
type HPSortHistory struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// SortResult holds the value of the "sort_result" field.
SortResult jsonfields.HPSortResult `json:"sort_result,omitempty"`
// OwnerUserID holds the value of the "owner_user_id" field.
OwnerUserID *int `json:"owner_user_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the HPSortHistoryQuery when eager-loading is set.
Edges HPSortHistoryEdges `json:"edges"`
// contains filtered or unexported fields
}
func (n *HPSortHistory) IsNode()
IsNode implements the Node interface check for GQLGen.
func (hsh *HPSortHistory) Owner(ctx context.Context) (*User, error)
func (hsh *HPSortHistory) QueryOwner() *UserQuery
QueryOwner queries the "owner" edge of the HPSortHistory entity.
func (hsh *HPSortHistory) String() string
String implements the fmt.Stringer.
func (hsh *HPSortHistory) ToEdge(order *HPSortHistoryOrder) *HPSortHistoryEdge
ToEdge converts HPSortHistory into HPSortHistoryEdge.
func (hsh *HPSortHistory) Unwrap() *HPSortHistory
Unwrap unwraps the HPSortHistory entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (hsh *HPSortHistory) Update() *HPSortHistoryUpdateOne
Update returns a builder for updating this HPSortHistory. Note that you need to call HPSortHistory.Unwrap() before calling this method if this HPSortHistory was returned from a transaction, and the transaction was committed or rolled back.
func (hsh *HPSortHistory) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the HPSortHistory. This includes values selected through modifiers, order, etc.
HPSortHistoryClient is a client for the HPSortHistory schema.
type HPSortHistoryClient struct {
// contains filtered or unexported fields
}
func NewHPSortHistoryClient(c config) *HPSortHistoryClient
NewHPSortHistoryClient returns a client for the HPSortHistory from the given config.
func (c *HPSortHistoryClient) Create() *HPSortHistoryCreate
Create returns a builder for creating a HPSortHistory entity.
func (c *HPSortHistoryClient) CreateBulk(builders ...*HPSortHistoryCreate) *HPSortHistoryCreateBulk
CreateBulk returns a builder for creating a bulk of HPSortHistory entities.
func (c *HPSortHistoryClient) Delete() *HPSortHistoryDelete
Delete returns a delete builder for HPSortHistory.
func (c *HPSortHistoryClient) DeleteOne(hsh *HPSortHistory) *HPSortHistoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *HPSortHistoryClient) DeleteOneID(id int) *HPSortHistoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *HPSortHistoryClient) Get(ctx context.Context, id int) (*HPSortHistory, error)
Get returns a HPSortHistory entity by its id.
func (c *HPSortHistoryClient) GetX(ctx context.Context, id int) *HPSortHistory
GetX is like Get, but panics if an error occurs.
func (c *HPSortHistoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *HPSortHistoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hpsorthistory.Intercept(f(g(h())))`.
func (c *HPSortHistoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *HPSortHistoryClient) Query() *HPSortHistoryQuery
Query returns a query builder for HPSortHistory.
func (c *HPSortHistoryClient) QueryOwner(hsh *HPSortHistory) *UserQuery
QueryOwner queries the owner edge of a HPSortHistory.
func (c *HPSortHistoryClient) Update() *HPSortHistoryUpdate
Update returns an update builder for HPSortHistory.
func (c *HPSortHistoryClient) UpdateOne(hsh *HPSortHistory) *HPSortHistoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *HPSortHistoryClient) UpdateOneID(id int) *HPSortHistoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *HPSortHistoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hpsorthistory.Hooks(f(g(h())))`.
HPSortHistoryConnection is the connection containing edges to HPSortHistory.
type HPSortHistoryConnection struct {
Edges []*HPSortHistoryEdge `json:"edges"`
PageInfo PageInfo `json:"pageInfo"`
TotalCount int `json:"totalCount"`
}
HPSortHistoryCreate is the builder for creating a HPSortHistory entity.
type HPSortHistoryCreate struct {
// contains filtered or unexported fields
}
func (hshc *HPSortHistoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (hshc *HPSortHistoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hshc *HPSortHistoryCreate) Mutation() *HPSortHistoryMutation
Mutation returns the HPSortHistoryMutation object of the builder.
func (hshc *HPSortHistoryCreate) OnConflict(opts ...sql.ConflictOption) *HPSortHistoryUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPSortHistory.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPSortHistoryUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (hshc *HPSortHistoryCreate) OnConflictColumns(columns ...string) *HPSortHistoryUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPSortHistory.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hshc *HPSortHistoryCreate) Save(ctx context.Context) (*HPSortHistory, error)
Save creates the HPSortHistory in the database.
func (hshc *HPSortHistoryCreate) SaveX(ctx context.Context) *HPSortHistory
SaveX calls Save and panics if Save returns an error.
func (hshc *HPSortHistoryCreate) SetCreatedAt(t time.Time) *HPSortHistoryCreate
SetCreatedAt sets the "created_at" field.
func (hshc *HPSortHistoryCreate) SetNillableCreatedAt(t *time.Time) *HPSortHistoryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (hshc *HPSortHistoryCreate) SetNillableOwnerID(id *int) *HPSortHistoryCreate
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (hshc *HPSortHistoryCreate) SetNillableOwnerUserID(i *int) *HPSortHistoryCreate
SetNillableOwnerUserID sets the "owner_user_id" field if the given value is not nil.
func (hshc *HPSortHistoryCreate) SetNillableUpdatedAt(t *time.Time) *HPSortHistoryCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hshc *HPSortHistoryCreate) SetOwner(u *User) *HPSortHistoryCreate
SetOwner sets the "owner" edge to the User entity.
func (hshc *HPSortHistoryCreate) SetOwnerID(id int) *HPSortHistoryCreate
SetOwnerID sets the "owner" edge to the User entity by ID.
func (hshc *HPSortHistoryCreate) SetOwnerUserID(i int) *HPSortHistoryCreate
SetOwnerUserID sets the "owner_user_id" field.
func (hshc *HPSortHistoryCreate) SetSortResult(jsr jsonfields.HPSortResult) *HPSortHistoryCreate
SetSortResult sets the "sort_result" field.
func (hshc *HPSortHistoryCreate) SetUpdatedAt(t time.Time) *HPSortHistoryCreate
SetUpdatedAt sets the "updated_at" field.
HPSortHistoryCreateBulk is the builder for creating many HPSortHistory entities in bulk.
type HPSortHistoryCreateBulk struct {
// contains filtered or unexported fields
}
func (hshcb *HPSortHistoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (hshcb *HPSortHistoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hshcb *HPSortHistoryCreateBulk) OnConflict(opts ...sql.ConflictOption) *HPSortHistoryUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPSortHistory.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPSortHistoryUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (hshcb *HPSortHistoryCreateBulk) OnConflictColumns(columns ...string) *HPSortHistoryUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPSortHistory.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hshcb *HPSortHistoryCreateBulk) Save(ctx context.Context) ([]*HPSortHistory, error)
Save creates the HPSortHistory entities in the database.
func (hshcb *HPSortHistoryCreateBulk) SaveX(ctx context.Context) []*HPSortHistory
SaveX is like Save, but panics if an error occurs.
HPSortHistoryDelete is the builder for deleting a HPSortHistory entity.
type HPSortHistoryDelete struct {
// contains filtered or unexported fields
}
func (hshd *HPSortHistoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (hshd *HPSortHistoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (hshd *HPSortHistoryDelete) Where(ps ...predicate.HPSortHistory) *HPSortHistoryDelete
Where appends a list predicates to the HPSortHistoryDelete builder.
HPSortHistoryDeleteOne is the builder for deleting a single HPSortHistory entity.
type HPSortHistoryDeleteOne struct {
// contains filtered or unexported fields
}
func (hshdo *HPSortHistoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (hshdo *HPSortHistoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hshdo *HPSortHistoryDeleteOne) Where(ps ...predicate.HPSortHistory) *HPSortHistoryDeleteOne
Where appends a list predicates to the HPSortHistoryDelete builder.
HPSortHistoryEdge is the edge representation of HPSortHistory.
type HPSortHistoryEdge struct {
Node *HPSortHistory `json:"node"`
Cursor Cursor `json:"cursor"`
}
HPSortHistoryEdges holds the relations/edges for other nodes in the graph.
type HPSortHistoryEdges struct {
// Owner holds the value of the owner edge.
Owner *User `json:"owner,omitempty"`
// contains filtered or unexported fields
}
func (e HPSortHistoryEdges) OwnerOrErr() (*User, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
HPSortHistoryFilter provides a generic filtering capability at runtime for HPSortHistoryQuery.
type HPSortHistoryFilter struct {
// contains filtered or unexported fields
}
func (f *HPSortHistoryFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *HPSortHistoryFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (f *HPSortHistoryFilter) WhereHasOwner()
WhereHasOwner applies a predicate to check if query has an edge owner.
func (f *HPSortHistoryFilter) WhereHasOwnerWith(preds ...predicate.User)
WhereHasOwnerWith applies a predicate to check if query has an edge owner with a given conditions (other predicates).
func (f *HPSortHistoryFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *HPSortHistoryFilter) WhereOwnerUserID(p entql.IntP)
WhereOwnerUserID applies the entql int predicate on the owner_user_id field.
func (f *HPSortHistoryFilter) WhereSortResult(p entql.BytesP)
WhereSortResult applies the entql json.RawMessage predicate on the sort_result field.
func (f *HPSortHistoryFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
HPSortHistoryGroupBy is the group-by builder for HPSortHistory entities.
type HPSortHistoryGroupBy struct {
// contains filtered or unexported fields
}
func (hshgb *HPSortHistoryGroupBy) Aggregate(fns ...AggregateFunc) *HPSortHistoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *HPSortHistoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPSortHistoryGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPSortHistoryGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPSortHistoryGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPSortHistoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPSortHistoryGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPSortHistoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPSortHistoryGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPSortHistoryGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPSortHistoryGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPSortHistoryGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPSortHistoryGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hshgb *HPSortHistoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPSortHistoryGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPSortHistoryGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPSortHistoryGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPSortHistoryGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPSortHistoryGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPSortHistoryMutation represents an operation that mutates the HPSortHistory nodes in the graph.
type HPSortHistoryMutation struct {
// contains filtered or unexported fields
}
func (m *HPSortHistoryMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPSortHistoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *HPSortHistoryMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPSortHistoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *HPSortHistoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *HPSortHistoryMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (m *HPSortHistoryMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *HPSortHistoryMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPSortHistoryMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (m *HPSortHistoryMutation) ClearOwnerUserID()
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (m *HPSortHistoryMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (m *HPSortHistoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *HPSortHistoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m HPSortHistoryMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *HPSortHistoryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (m *HPSortHistoryMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (m *HPSortHistoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *HPSortHistoryMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPSortHistoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *HPSortHistoryMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *HPSortHistoryMutation) Filter() *HPSortHistoryFilter
Filter returns an entql.Where implementation to apply filters on the HPSortHistoryMutation builder.
func (m *HPSortHistoryMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *HPSortHistoryMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *HPSortHistoryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
OldCreatedAt returns the old "created_at" field's value of the HPSortHistory entity. If the HPSortHistory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPSortHistoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *HPSortHistoryMutation) OldOwnerUserID(ctx context.Context) (v *int, err error)
OldOwnerUserID returns the old "owner_user_id" field's value of the HPSortHistory entity. If the HPSortHistory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPSortHistoryMutation) OldSortResult(ctx context.Context) (v jsonfields.HPSortResult, err error)
OldSortResult returns the old "sort_result" field's value of the HPSortHistory entity. If the HPSortHistory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPSortHistoryMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
OldUpdatedAt returns the old "updated_at" field's value of the HPSortHistory entity. If the HPSortHistory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPSortHistoryMutation) Op() Op
Op returns the operation name.
func (m *HPSortHistoryMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (m *HPSortHistoryMutation) OwnerID() (id int, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (m *HPSortHistoryMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (m *HPSortHistoryMutation) OwnerUserID() (r int, exists bool)
OwnerUserID returns the value of the "owner_user_id" field in the mutation.
func (m *HPSortHistoryMutation) OwnerUserIDCleared() bool
OwnerUserIDCleared returns if the "owner_user_id" field was cleared in this mutation.
func (m *HPSortHistoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *HPSortHistoryMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *HPSortHistoryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (m *HPSortHistoryMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *HPSortHistoryMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPSortHistoryMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (m *HPSortHistoryMutation) ResetOwnerUserID()
ResetOwnerUserID resets all changes to the "owner_user_id" field.
func (m *HPSortHistoryMutation) ResetSortResult()
ResetSortResult resets all changes to the "sort_result" field.
func (m *HPSortHistoryMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (m *HPSortHistoryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (m *HPSortHistoryMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPSortHistoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *HPSortHistoryMutation) SetOwnerID(id int)
SetOwnerID sets the "owner" edge to the User entity by id.
func (m *HPSortHistoryMutation) SetOwnerUserID(i int)
SetOwnerUserID sets the "owner_user_id" field.
func (m *HPSortHistoryMutation) SetSortResult(jsr jsonfields.HPSortResult)
SetSortResult sets the "sort_result" field.
func (m *HPSortHistoryMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (m *HPSortHistoryMutation) SortResult() (r jsonfields.HPSortResult, exists bool)
SortResult returns the value of the "sort_result" field in the mutation.
func (m HPSortHistoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *HPSortHistoryMutation) Type() string
Type returns the node type of this mutation (HPSortHistory).
func (m *HPSortHistoryMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (m *HPSortHistoryMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (m *HPSortHistoryMutation) Where(ps ...predicate.HPSortHistory)
Where appends a list predicates to the HPSortHistoryMutation builder.
func (m *HPSortHistoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HPSortHistoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
HPSortHistoryOrder defines the ordering of HPSortHistory.
type HPSortHistoryOrder struct {
Direction OrderDirection `json:"direction"`
Field *HPSortHistoryOrderField `json:"field"`
}
HPSortHistoryOrderField defines the ordering field of HPSortHistory.
type HPSortHistoryOrderField struct {
// contains filtered or unexported fields
}
HPSortHistoryPaginateOption enables pagination customization.
type HPSortHistoryPaginateOption func(*hpsorthistoryPager) error
func WithHPSortHistoryFilter(filter func(*HPSortHistoryQuery) (*HPSortHistoryQuery, error)) HPSortHistoryPaginateOption
WithHPSortHistoryFilter configures pagination filter.
func WithHPSortHistoryOrder(order *HPSortHistoryOrder) HPSortHistoryPaginateOption
WithHPSortHistoryOrder configures pagination ordering.
HPSortHistoryQuery is the builder for querying HPSortHistory entities.
type HPSortHistoryQuery struct {
// contains filtered or unexported fields
}
func (hshq *HPSortHistoryQuery) Aggregate(fns ...AggregateFunc) *HPSortHistorySelect
Aggregate returns a HPSortHistorySelect configured with the given aggregations.
func (hshq *HPSortHistoryQuery) All(ctx context.Context) ([]*HPSortHistory, error)
All executes the query and returns a list of HPSortHistories.
func (hshq *HPSortHistoryQuery) AllX(ctx context.Context) []*HPSortHistory
AllX is like All, but panics if an error occurs.
func (hshq *HPSortHistoryQuery) Clone() *HPSortHistoryQuery
Clone returns a duplicate of the HPSortHistoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (hsh *HPSortHistoryQuery) CollectFields(ctx context.Context, satisfies ...string) (*HPSortHistoryQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (hshq *HPSortHistoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (hshq *HPSortHistoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (hshq *HPSortHistoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (hshq *HPSortHistoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (hshq *HPSortHistoryQuery) Filter() *HPSortHistoryFilter
Filter returns a Filter implementation to apply filters on the HPSortHistoryQuery builder.
func (hshq *HPSortHistoryQuery) First(ctx context.Context) (*HPSortHistory, error)
First returns the first HPSortHistory entity from the query. Returns a *NotFoundError when no HPSortHistory was found.
func (hshq *HPSortHistoryQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first HPSortHistory ID from the query. Returns a *NotFoundError when no HPSortHistory ID was found.
func (hshq *HPSortHistoryQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (hshq *HPSortHistoryQuery) FirstX(ctx context.Context) *HPSortHistory
FirstX is like First, but panics if an error occurs.
func (hshq *HPSortHistoryQuery) GroupBy(field string, fields ...string) *HPSortHistoryGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.HPSortHistory.Query().
GroupBy(hpsorthistory.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (hshq *HPSortHistoryQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of HPSortHistory IDs.
func (hshq *HPSortHistoryQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (hshq *HPSortHistoryQuery) Limit(limit int) *HPSortHistoryQuery
Limit the number of records to be returned by this query.
func (hshq *HPSortHistoryQuery) Offset(offset int) *HPSortHistoryQuery
Offset to start from.
func (hshq *HPSortHistoryQuery) Only(ctx context.Context) (*HPSortHistory, error)
Only returns a single HPSortHistory entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HPSortHistory entity is found. Returns a *NotFoundError when no HPSortHistory entities are found.
func (hshq *HPSortHistoryQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only HPSortHistory ID in the query. Returns a *NotSingularError when more than one HPSortHistory ID is found. Returns a *NotFoundError when no entities are found.
func (hshq *HPSortHistoryQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (hshq *HPSortHistoryQuery) OnlyX(ctx context.Context) *HPSortHistory
OnlyX is like Only, but panics if an error occurs.
func (hshq *HPSortHistoryQuery) Order(o ...hpsorthistory.Order) *HPSortHistoryQuery
Order specifies how the records should be ordered.
func (hsh *HPSortHistoryQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...HPSortHistoryPaginateOption, ) (*HPSortHistoryConnection, error)
Paginate executes the query and returns a relay based cursor connection to HPSortHistory.
func (hshq *HPSortHistoryQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the "owner" edge.
func (hshq *HPSortHistoryQuery) Select(fields ...string) *HPSortHistorySelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.HPSortHistory.Query().
Select(hpsorthistory.FieldCreatedAt).
Scan(ctx, &v)
func (hshq *HPSortHistoryQuery) Unique(unique bool) *HPSortHistoryQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (hshq *HPSortHistoryQuery) Where(ps ...predicate.HPSortHistory) *HPSortHistoryQuery
Where adds a new predicate for the HPSortHistoryQuery builder.
func (hshq *HPSortHistoryQuery) WithOwner(opts ...func(*UserQuery)) *HPSortHistoryQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
HPSortHistorySelect is the builder for selecting fields of HPSortHistory entities.
type HPSortHistorySelect struct {
*HPSortHistoryQuery
// contains filtered or unexported fields
}
func (hshs *HPSortHistorySelect) Aggregate(fns ...AggregateFunc) *HPSortHistorySelect
Aggregate adds the given aggregation functions to the selector query.
func (s *HPSortHistorySelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPSortHistorySelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPSortHistorySelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPSortHistorySelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPSortHistorySelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPSortHistorySelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPSortHistorySelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPSortHistorySelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPSortHistorySelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPSortHistorySelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPSortHistorySelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPSortHistorySelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hshs *HPSortHistorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPSortHistorySelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPSortHistorySelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPSortHistorySelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPSortHistorySelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPSortHistorySelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPSortHistoryUpdate is the builder for updating HPSortHistory entities.
type HPSortHistoryUpdate struct {
// contains filtered or unexported fields
}
func (hshu *HPSortHistoryUpdate) ClearOwner() *HPSortHistoryUpdate
ClearOwner clears the "owner" edge to the User entity.
func (hshu *HPSortHistoryUpdate) ClearOwnerUserID() *HPSortHistoryUpdate
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (hshu *HPSortHistoryUpdate) ClearUpdatedAt() *HPSortHistoryUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (hshu *HPSortHistoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (hshu *HPSortHistoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hshu *HPSortHistoryUpdate) Mutation() *HPSortHistoryMutation
Mutation returns the HPSortHistoryMutation object of the builder.
func (hshu *HPSortHistoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (hshu *HPSortHistoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (hshu *HPSortHistoryUpdate) SetNillableOwnerID(id *int) *HPSortHistoryUpdate
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (hshu *HPSortHistoryUpdate) SetNillableOwnerUserID(i *int) *HPSortHistoryUpdate
SetNillableOwnerUserID sets the "owner_user_id" field if the given value is not nil.
func (hshu *HPSortHistoryUpdate) SetNillableUpdatedAt(t *time.Time) *HPSortHistoryUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hshu *HPSortHistoryUpdate) SetOwner(u *User) *HPSortHistoryUpdate
SetOwner sets the "owner" edge to the User entity.
func (hshu *HPSortHistoryUpdate) SetOwnerID(id int) *HPSortHistoryUpdate
SetOwnerID sets the "owner" edge to the User entity by ID.
func (hshu *HPSortHistoryUpdate) SetOwnerUserID(i int) *HPSortHistoryUpdate
SetOwnerUserID sets the "owner_user_id" field.
func (hshu *HPSortHistoryUpdate) SetUpdatedAt(t time.Time) *HPSortHistoryUpdate
SetUpdatedAt sets the "updated_at" field.
func (hshu *HPSortHistoryUpdate) Where(ps ...predicate.HPSortHistory) *HPSortHistoryUpdate
Where appends a list predicates to the HPSortHistoryUpdate builder.
HPSortHistoryUpdateOne is the builder for updating a single HPSortHistory entity.
type HPSortHistoryUpdateOne struct {
// contains filtered or unexported fields
}
func (hshuo *HPSortHistoryUpdateOne) ClearOwner() *HPSortHistoryUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (hshuo *HPSortHistoryUpdateOne) ClearOwnerUserID() *HPSortHistoryUpdateOne
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (hshuo *HPSortHistoryUpdateOne) ClearUpdatedAt() *HPSortHistoryUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (hshuo *HPSortHistoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (hshuo *HPSortHistoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hshuo *HPSortHistoryUpdateOne) Mutation() *HPSortHistoryMutation
Mutation returns the HPSortHistoryMutation object of the builder.
func (hshuo *HPSortHistoryUpdateOne) Save(ctx context.Context) (*HPSortHistory, error)
Save executes the query and returns the updated HPSortHistory entity.
func (hshuo *HPSortHistoryUpdateOne) SaveX(ctx context.Context) *HPSortHistory
SaveX is like Save, but panics if an error occurs.
func (hshuo *HPSortHistoryUpdateOne) Select(field string, fields ...string) *HPSortHistoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (hshuo *HPSortHistoryUpdateOne) SetNillableOwnerID(id *int) *HPSortHistoryUpdateOne
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (hshuo *HPSortHistoryUpdateOne) SetNillableOwnerUserID(i *int) *HPSortHistoryUpdateOne
SetNillableOwnerUserID sets the "owner_user_id" field if the given value is not nil.
func (hshuo *HPSortHistoryUpdateOne) SetNillableUpdatedAt(t *time.Time) *HPSortHistoryUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hshuo *HPSortHistoryUpdateOne) SetOwner(u *User) *HPSortHistoryUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (hshuo *HPSortHistoryUpdateOne) SetOwnerID(id int) *HPSortHistoryUpdateOne
SetOwnerID sets the "owner" edge to the User entity by ID.
func (hshuo *HPSortHistoryUpdateOne) SetOwnerUserID(i int) *HPSortHistoryUpdateOne
SetOwnerUserID sets the "owner_user_id" field.
func (hshuo *HPSortHistoryUpdateOne) SetUpdatedAt(t time.Time) *HPSortHistoryUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (hshuo *HPSortHistoryUpdateOne) Where(ps ...predicate.HPSortHistory) *HPSortHistoryUpdateOne
Where appends a list predicates to the HPSortHistoryUpdate builder.
HPSortHistoryUpsert is the "OnConflict" setter.
type HPSortHistoryUpsert struct {
*sql.UpdateSet
}
func (u *HPSortHistoryUpsert) ClearOwnerUserID() *HPSortHistoryUpsert
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (u *HPSortHistoryUpsert) ClearUpdatedAt() *HPSortHistoryUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPSortHistoryUpsert) SetOwnerUserID(v int) *HPSortHistoryUpsert
SetOwnerUserID sets the "owner_user_id" field.
func (u *HPSortHistoryUpsert) SetUpdatedAt(v time.Time) *HPSortHistoryUpsert
SetUpdatedAt sets the "updated_at" field.
func (u *HPSortHistoryUpsert) UpdateOwnerUserID() *HPSortHistoryUpsert
UpdateOwnerUserID sets the "owner_user_id" field to the value that was provided on create.
func (u *HPSortHistoryUpsert) UpdateUpdatedAt() *HPSortHistoryUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPSortHistoryUpsertBulk is the builder for "upsert"-ing a bulk of HPSortHistory nodes.
type HPSortHistoryUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *HPSortHistoryUpsertBulk) ClearOwnerUserID() *HPSortHistoryUpsertBulk
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (u *HPSortHistoryUpsertBulk) ClearUpdatedAt() *HPSortHistoryUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPSortHistoryUpsertBulk) DoNothing() *HPSortHistoryUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPSortHistoryUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPSortHistoryUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPSortHistoryUpsertBulk) Ignore() *HPSortHistoryUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPSortHistory.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *HPSortHistoryUpsertBulk) SetOwnerUserID(v int) *HPSortHistoryUpsertBulk
SetOwnerUserID sets the "owner_user_id" field.
func (u *HPSortHistoryUpsertBulk) SetUpdatedAt(v time.Time) *HPSortHistoryUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (u *HPSortHistoryUpsertBulk) Update(set func(*HPSortHistoryUpsert)) *HPSortHistoryUpsertBulk
Update allows overriding fields `UPDATE` values. See the HPSortHistoryCreateBulk.OnConflict documentation for more info.
func (u *HPSortHistoryUpsertBulk) UpdateNewValues() *HPSortHistoryUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPSortHistory.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPSortHistoryUpsertBulk) UpdateOwnerUserID() *HPSortHistoryUpsertBulk
UpdateOwnerUserID sets the "owner_user_id" field to the value that was provided on create.
func (u *HPSortHistoryUpsertBulk) UpdateUpdatedAt() *HPSortHistoryUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPSortHistoryUpsertOne is the builder for "upsert"-ing
one HPSortHistory node.
type HPSortHistoryUpsertOne struct {
// contains filtered or unexported fields
}
func (u *HPSortHistoryUpsertOne) ClearOwnerUserID() *HPSortHistoryUpsertOne
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (u *HPSortHistoryUpsertOne) ClearUpdatedAt() *HPSortHistoryUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPSortHistoryUpsertOne) DoNothing() *HPSortHistoryUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPSortHistoryUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPSortHistoryUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPSortHistoryUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *HPSortHistoryUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *HPSortHistoryUpsertOne) Ignore() *HPSortHistoryUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPSortHistory.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *HPSortHistoryUpsertOne) SetOwnerUserID(v int) *HPSortHistoryUpsertOne
SetOwnerUserID sets the "owner_user_id" field.
func (u *HPSortHistoryUpsertOne) SetUpdatedAt(v time.Time) *HPSortHistoryUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (u *HPSortHistoryUpsertOne) Update(set func(*HPSortHistoryUpsert)) *HPSortHistoryUpsertOne
Update allows overriding fields `UPDATE` values. See the HPSortHistoryCreate.OnConflict documentation for more info.
func (u *HPSortHistoryUpsertOne) UpdateNewValues() *HPSortHistoryUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPSortHistory.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPSortHistoryUpsertOne) UpdateOwnerUserID() *HPSortHistoryUpsertOne
UpdateOwnerUserID sets the "owner_user_id" field to the value that was provided on create.
func (u *HPSortHistoryUpsertOne) UpdateUpdatedAt() *HPSortHistoryUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPViewHistories is a parsable slice of HPViewHistory.
type HPViewHistories []*HPViewHistory
HPViewHistory is the model entity for the HPViewHistory schema.
type HPViewHistory struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// ContentID holds the value of the "content_id" field.
ContentID int `json:"content_id,omitempty"`
// post_at field value on content to query histories by post_at range
ContentPostAt time.Time `json:"content_post_at,omitempty"`
// AssetType holds the value of the "asset_type" field.
AssetType enums.HPAssetType `json:"asset_type,omitempty"`
// IsFavorite holds the value of the "is_favorite" field.
IsFavorite bool `json:"is_favorite,omitempty"`
// OwnerUserID holds the value of the "owner_user_id" field.
OwnerUserID int `json:"owner_user_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the HPViewHistoryQuery when eager-loading is set.
Edges HPViewHistoryEdges `json:"edges"`
// contains filtered or unexported fields
}
func (hvh *HPViewHistory) Feed(ctx context.Context) (*HPFeedItem, error)
func (n *HPViewHistory) IsNode()
IsNode implements the Node interface check for GQLGen.
func (hvh *HPViewHistory) QueryFeed() *HPFeedItemQuery
QueryFeed queries the "feed" edge of the HPViewHistory entity.
func (hvh *HPViewHistory) QueryUser() *UserQuery
QueryUser queries the "user" edge of the HPViewHistory entity.
func (hvh *HPViewHistory) String() string
String implements the fmt.Stringer.
func (hvh *HPViewHistory) ToEdge(order *HPViewHistoryOrder) *HPViewHistoryEdge
ToEdge converts HPViewHistory into HPViewHistoryEdge.
func (hvh *HPViewHistory) Unwrap() *HPViewHistory
Unwrap unwraps the HPViewHistory entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (hvh *HPViewHistory) Update() *HPViewHistoryUpdateOne
Update returns a builder for updating this HPViewHistory. Note that you need to call HPViewHistory.Unwrap() before calling this method if this HPViewHistory was returned from a transaction, and the transaction was committed or rolled back.
func (hvh *HPViewHistory) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the HPViewHistory. This includes values selected through modifiers, order, etc.
HPViewHistoryClient is a client for the HPViewHistory schema.
type HPViewHistoryClient struct {
// contains filtered or unexported fields
}
func NewHPViewHistoryClient(c config) *HPViewHistoryClient
NewHPViewHistoryClient returns a client for the HPViewHistory from the given config.
func (c *HPViewHistoryClient) Create() *HPViewHistoryCreate
Create returns a builder for creating a HPViewHistory entity.
func (c *HPViewHistoryClient) CreateBulk(builders ...*HPViewHistoryCreate) *HPViewHistoryCreateBulk
CreateBulk returns a builder for creating a bulk of HPViewHistory entities.
func (c *HPViewHistoryClient) Delete() *HPViewHistoryDelete
Delete returns a delete builder for HPViewHistory.
func (c *HPViewHistoryClient) DeleteOne(hvh *HPViewHistory) *HPViewHistoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *HPViewHistoryClient) DeleteOneID(id int) *HPViewHistoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *HPViewHistoryClient) Get(ctx context.Context, id int) (*HPViewHistory, error)
Get returns a HPViewHistory entity by its id.
func (c *HPViewHistoryClient) GetX(ctx context.Context, id int) *HPViewHistory
GetX is like Get, but panics if an error occurs.
func (c *HPViewHistoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *HPViewHistoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hpviewhistory.Intercept(f(g(h())))`.
func (c *HPViewHistoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *HPViewHistoryClient) Query() *HPViewHistoryQuery
Query returns a query builder for HPViewHistory.
func (c *HPViewHistoryClient) QueryFeed(hvh *HPViewHistory) *HPFeedItemQuery
QueryFeed queries the feed edge of a HPViewHistory.
func (c *HPViewHistoryClient) QueryUser(hvh *HPViewHistory) *UserQuery
QueryUser queries the user edge of a HPViewHistory.
func (c *HPViewHistoryClient) Update() *HPViewHistoryUpdate
Update returns an update builder for HPViewHistory.
func (c *HPViewHistoryClient) UpdateOne(hvh *HPViewHistory) *HPViewHistoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *HPViewHistoryClient) UpdateOneID(id int) *HPViewHistoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *HPViewHistoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hpviewhistory.Hooks(f(g(h())))`.
HPViewHistoryConnection is the connection containing edges to HPViewHistory.
type HPViewHistoryConnection struct {
Edges []*HPViewHistoryEdge `json:"edges"`
PageInfo PageInfo `json:"pageInfo"`
TotalCount int `json:"totalCount"`
}
HPViewHistoryCreate is the builder for creating a HPViewHistory entity.
type HPViewHistoryCreate struct {
// contains filtered or unexported fields
}
func (hvhc *HPViewHistoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (hvhc *HPViewHistoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hvhc *HPViewHistoryCreate) Mutation() *HPViewHistoryMutation
Mutation returns the HPViewHistoryMutation object of the builder.
func (hvhc *HPViewHistoryCreate) OnConflict(opts ...sql.ConflictOption) *HPViewHistoryUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPViewHistory.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPViewHistoryUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (hvhc *HPViewHistoryCreate) OnConflictColumns(columns ...string) *HPViewHistoryUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPViewHistory.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hvhc *HPViewHistoryCreate) Save(ctx context.Context) (*HPViewHistory, error)
Save creates the HPViewHistory in the database.
func (hvhc *HPViewHistoryCreate) SaveX(ctx context.Context) *HPViewHistory
SaveX calls Save and panics if Save returns an error.
func (hvhc *HPViewHistoryCreate) SetAssetType(eat enums.HPAssetType) *HPViewHistoryCreate
SetAssetType sets the "asset_type" field.
func (hvhc *HPViewHistoryCreate) SetContentID(i int) *HPViewHistoryCreate
SetContentID sets the "content_id" field.
func (hvhc *HPViewHistoryCreate) SetContentPostAt(t time.Time) *HPViewHistoryCreate
SetContentPostAt sets the "content_post_at" field.
func (hvhc *HPViewHistoryCreate) SetCreatedAt(t time.Time) *HPViewHistoryCreate
SetCreatedAt sets the "created_at" field.
func (hvhc *HPViewHistoryCreate) SetFeed(h *HPFeedItem) *HPViewHistoryCreate
SetFeed sets the "feed" edge to the HPFeedItem entity.
func (hvhc *HPViewHistoryCreate) SetFeedID(id int) *HPViewHistoryCreate
SetFeedID sets the "feed" edge to the HPFeedItem entity by ID.
func (hvhc *HPViewHistoryCreate) SetIsFavorite(b bool) *HPViewHistoryCreate
SetIsFavorite sets the "is_favorite" field.
func (hvhc *HPViewHistoryCreate) SetNillableCreatedAt(t *time.Time) *HPViewHistoryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (hvhc *HPViewHistoryCreate) SetNillableFeedID(id *int) *HPViewHistoryCreate
SetNillableFeedID sets the "feed" edge to the HPFeedItem entity by ID if the given value is not nil.
func (hvhc *HPViewHistoryCreate) SetNillableIsFavorite(b *bool) *HPViewHistoryCreate
SetNillableIsFavorite sets the "is_favorite" field if the given value is not nil.
func (hvhc *HPViewHistoryCreate) SetNillableUpdatedAt(t *time.Time) *HPViewHistoryCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hvhc *HPViewHistoryCreate) SetOwnerUserID(i int) *HPViewHistoryCreate
SetOwnerUserID sets the "owner_user_id" field.
func (hvhc *HPViewHistoryCreate) SetUpdatedAt(t time.Time) *HPViewHistoryCreate
SetUpdatedAt sets the "updated_at" field.
func (hvhc *HPViewHistoryCreate) SetUser(u *User) *HPViewHistoryCreate
SetUser sets the "user" edge to the User entity.
func (hvhc *HPViewHistoryCreate) SetUserID(id int) *HPViewHistoryCreate
SetUserID sets the "user" edge to the User entity by ID.
HPViewHistoryCreateBulk is the builder for creating many HPViewHistory entities in bulk.
type HPViewHistoryCreateBulk struct {
// contains filtered or unexported fields
}
func (hvhcb *HPViewHistoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (hvhcb *HPViewHistoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hvhcb *HPViewHistoryCreateBulk) OnConflict(opts ...sql.ConflictOption) *HPViewHistoryUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HPViewHistory.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.HPViewHistoryUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (hvhcb *HPViewHistoryCreateBulk) OnConflictColumns(columns ...string) *HPViewHistoryUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HPViewHistory.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (hvhcb *HPViewHistoryCreateBulk) Save(ctx context.Context) ([]*HPViewHistory, error)
Save creates the HPViewHistory entities in the database.
func (hvhcb *HPViewHistoryCreateBulk) SaveX(ctx context.Context) []*HPViewHistory
SaveX is like Save, but panics if an error occurs.
HPViewHistoryDelete is the builder for deleting a HPViewHistory entity.
type HPViewHistoryDelete struct {
// contains filtered or unexported fields
}
func (hvhd *HPViewHistoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (hvhd *HPViewHistoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (hvhd *HPViewHistoryDelete) Where(ps ...predicate.HPViewHistory) *HPViewHistoryDelete
Where appends a list predicates to the HPViewHistoryDelete builder.
HPViewHistoryDeleteOne is the builder for deleting a single HPViewHistory entity.
type HPViewHistoryDeleteOne struct {
// contains filtered or unexported fields
}
func (hvhdo *HPViewHistoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (hvhdo *HPViewHistoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hvhdo *HPViewHistoryDeleteOne) Where(ps ...predicate.HPViewHistory) *HPViewHistoryDeleteOne
Where appends a list predicates to the HPViewHistoryDelete builder.
HPViewHistoryEdge is the edge representation of HPViewHistory.
type HPViewHistoryEdge struct {
Node *HPViewHistory `json:"node"`
Cursor Cursor `json:"cursor"`
}
HPViewHistoryEdges holds the relations/edges for other nodes in the graph.
type HPViewHistoryEdges struct {
// Feed holds the value of the feed edge.
Feed *HPFeedItem `json:"feed,omitempty"`
// User holds the value of the user edge.
User *User `json:"user,omitempty"`
// contains filtered or unexported fields
}
func (e HPViewHistoryEdges) FeedOrErr() (*HPFeedItem, error)
FeedOrErr returns the Feed value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (e HPViewHistoryEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
HPViewHistoryFilter provides a generic filtering capability at runtime for HPViewHistoryQuery.
type HPViewHistoryFilter struct {
// contains filtered or unexported fields
}
func (f *HPViewHistoryFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *HPViewHistoryFilter) WhereAssetType(p entql.StringP)
WhereAssetType applies the entql string predicate on the asset_type field.
func (f *HPViewHistoryFilter) WhereContentID(p entql.IntP)
WhereContentID applies the entql int predicate on the content_id field.
func (f *HPViewHistoryFilter) WhereContentPostAt(p entql.TimeP)
WhereContentPostAt applies the entql time.Time predicate on the content_post_at field.
func (f *HPViewHistoryFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (f *HPViewHistoryFilter) WhereHasFeed()
WhereHasFeed applies a predicate to check if query has an edge feed.
func (f *HPViewHistoryFilter) WhereHasFeedWith(preds ...predicate.HPFeedItem)
WhereHasFeedWith applies a predicate to check if query has an edge feed with a given conditions (other predicates).
func (f *HPViewHistoryFilter) WhereHasUser()
WhereHasUser applies a predicate to check if query has an edge user.
func (f *HPViewHistoryFilter) WhereHasUserWith(preds ...predicate.User)
WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).
func (f *HPViewHistoryFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *HPViewHistoryFilter) WhereIsFavorite(p entql.BoolP)
WhereIsFavorite applies the entql bool predicate on the is_favorite field.
func (f *HPViewHistoryFilter) WhereOwnerUserID(p entql.IntP)
WhereOwnerUserID applies the entql int predicate on the owner_user_id field.
func (f *HPViewHistoryFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
HPViewHistoryGroupBy is the group-by builder for HPViewHistory entities.
type HPViewHistoryGroupBy struct {
// contains filtered or unexported fields
}
func (hvhgb *HPViewHistoryGroupBy) Aggregate(fns ...AggregateFunc) *HPViewHistoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *HPViewHistoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPViewHistoryGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPViewHistoryGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPViewHistoryGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPViewHistoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPViewHistoryGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPViewHistoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPViewHistoryGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPViewHistoryGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPViewHistoryGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPViewHistoryGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPViewHistoryGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hvhgb *HPViewHistoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPViewHistoryGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPViewHistoryGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPViewHistoryGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPViewHistoryGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPViewHistoryGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPViewHistoryMutation represents an operation that mutates the HPViewHistory nodes in the graph.
type HPViewHistoryMutation struct {
// contains filtered or unexported fields
}
func (m *HPViewHistoryMutation) AddContentID(i int)
AddContentID adds i to the "content_id" field.
func (m *HPViewHistoryMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPViewHistoryMutation) AddedContentID() (r int, exists bool)
AddedContentID returns the value that was added to the "content_id" field in this mutation.
func (m *HPViewHistoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *HPViewHistoryMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPViewHistoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *HPViewHistoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *HPViewHistoryMutation) AssetType() (r enums.HPAssetType, exists bool)
AssetType returns the value of the "asset_type" field in the mutation.
func (m *HPViewHistoryMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (m *HPViewHistoryMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *HPViewHistoryMutation) ClearFeed()
ClearFeed clears the "feed" edge to the HPFeedItem entity.
func (m *HPViewHistoryMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPViewHistoryMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (m *HPViewHistoryMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (m *HPViewHistoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *HPViewHistoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m HPViewHistoryMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *HPViewHistoryMutation) ContentID() (r int, exists bool)
ContentID returns the value of the "content_id" field in the mutation.
func (m *HPViewHistoryMutation) ContentPostAt() (r time.Time, exists bool)
ContentPostAt returns the value of the "content_post_at" field in the mutation.
func (m *HPViewHistoryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (m *HPViewHistoryMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (m *HPViewHistoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *HPViewHistoryMutation) FeedCleared() bool
FeedCleared reports if the "feed" edge to the HPFeedItem entity was cleared.
func (m *HPViewHistoryMutation) FeedID() (id int, exists bool)
FeedID returns the "feed" edge ID in the mutation.
func (m *HPViewHistoryMutation) FeedIDs() (ids []int)
FeedIDs returns the "feed" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FeedID instead. It exists only for internal usage by the builders.
func (m *HPViewHistoryMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *HPViewHistoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *HPViewHistoryMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *HPViewHistoryMutation) Filter() *HPViewHistoryFilter
Filter returns an entql.Where implementation to apply filters on the HPViewHistoryMutation builder.
func (m *HPViewHistoryMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *HPViewHistoryMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *HPViewHistoryMutation) IsFavorite() (r bool, exists bool)
IsFavorite returns the value of the "is_favorite" field in the mutation.
func (m *HPViewHistoryMutation) OldAssetType(ctx context.Context) (v enums.HPAssetType, err error)
OldAssetType returns the old "asset_type" field's value of the HPViewHistory entity. If the HPViewHistory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPViewHistoryMutation) OldContentID(ctx context.Context) (v int, err error)
OldContentID returns the old "content_id" field's value of the HPViewHistory entity. If the HPViewHistory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPViewHistoryMutation) OldContentPostAt(ctx context.Context) (v time.Time, err error)
OldContentPostAt returns the old "content_post_at" field's value of the HPViewHistory entity. If the HPViewHistory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPViewHistoryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
OldCreatedAt returns the old "created_at" field's value of the HPViewHistory entity. If the HPViewHistory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPViewHistoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *HPViewHistoryMutation) OldIsFavorite(ctx context.Context) (v bool, err error)
OldIsFavorite returns the old "is_favorite" field's value of the HPViewHistory entity. If the HPViewHistory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPViewHistoryMutation) OldOwnerUserID(ctx context.Context) (v int, err error)
OldOwnerUserID returns the old "owner_user_id" field's value of the HPViewHistory entity. If the HPViewHistory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPViewHistoryMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
OldUpdatedAt returns the old "updated_at" field's value of the HPViewHistory entity. If the HPViewHistory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *HPViewHistoryMutation) Op() Op
Op returns the operation name.
func (m *HPViewHistoryMutation) OwnerUserID() (r int, exists bool)
OwnerUserID returns the value of the "owner_user_id" field in the mutation.
func (m *HPViewHistoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *HPViewHistoryMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *HPViewHistoryMutation) ResetAssetType()
ResetAssetType resets all changes to the "asset_type" field.
func (m *HPViewHistoryMutation) ResetContentID()
ResetContentID resets all changes to the "content_id" field.
func (m *HPViewHistoryMutation) ResetContentPostAt()
ResetContentPostAt resets all changes to the "content_post_at" field.
func (m *HPViewHistoryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (m *HPViewHistoryMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *HPViewHistoryMutation) ResetFeed()
ResetFeed resets all changes to the "feed" edge.
func (m *HPViewHistoryMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *HPViewHistoryMutation) ResetIsFavorite()
ResetIsFavorite resets all changes to the "is_favorite" field.
func (m *HPViewHistoryMutation) ResetOwnerUserID()
ResetOwnerUserID resets all changes to the "owner_user_id" field.
func (m *HPViewHistoryMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (m *HPViewHistoryMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (m *HPViewHistoryMutation) SetAssetType(eat enums.HPAssetType)
SetAssetType sets the "asset_type" field.
func (m *HPViewHistoryMutation) SetContentID(i int)
SetContentID sets the "content_id" field.
func (m *HPViewHistoryMutation) SetContentPostAt(t time.Time)
SetContentPostAt sets the "content_post_at" field.
func (m *HPViewHistoryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (m *HPViewHistoryMutation) SetFeedID(id int)
SetFeedID sets the "feed" edge to the HPFeedItem entity by id.
func (m *HPViewHistoryMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *HPViewHistoryMutation) SetIsFavorite(b bool)
SetIsFavorite sets the "is_favorite" field.
func (m *HPViewHistoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *HPViewHistoryMutation) SetOwnerUserID(i int)
SetOwnerUserID sets the "owner_user_id" field.
func (m *HPViewHistoryMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (m *HPViewHistoryMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (m HPViewHistoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *HPViewHistoryMutation) Type() string
Type returns the node type of this mutation (HPViewHistory).
func (m *HPViewHistoryMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (m *HPViewHistoryMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (m *HPViewHistoryMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (m *HPViewHistoryMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (m *HPViewHistoryMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (m *HPViewHistoryMutation) Where(ps ...predicate.HPViewHistory)
Where appends a list predicates to the HPViewHistoryMutation builder.
func (m *HPViewHistoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HPViewHistoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
HPViewHistoryOrder defines the ordering of HPViewHistory.
type HPViewHistoryOrder struct {
Direction OrderDirection `json:"direction"`
Field *HPViewHistoryOrderField `json:"field"`
}
HPViewHistoryOrderField defines the ordering field of HPViewHistory.
type HPViewHistoryOrderField struct {
// contains filtered or unexported fields
}
HPViewHistoryPaginateOption enables pagination customization.
type HPViewHistoryPaginateOption func(*hpviewhistoryPager) error
func WithHPViewHistoryFilter(filter func(*HPViewHistoryQuery) (*HPViewHistoryQuery, error)) HPViewHistoryPaginateOption
WithHPViewHistoryFilter configures pagination filter.
func WithHPViewHistoryOrder(order *HPViewHistoryOrder) HPViewHistoryPaginateOption
WithHPViewHistoryOrder configures pagination ordering.
HPViewHistoryQuery is the builder for querying HPViewHistory entities.
type HPViewHistoryQuery struct {
// contains filtered or unexported fields
}
func (hvhq *HPViewHistoryQuery) Aggregate(fns ...AggregateFunc) *HPViewHistorySelect
Aggregate returns a HPViewHistorySelect configured with the given aggregations.
func (hvhq *HPViewHistoryQuery) All(ctx context.Context) ([]*HPViewHistory, error)
All executes the query and returns a list of HPViewHistories.
func (hvhq *HPViewHistoryQuery) AllX(ctx context.Context) []*HPViewHistory
AllX is like All, but panics if an error occurs.
func (hvhq *HPViewHistoryQuery) Clone() *HPViewHistoryQuery
Clone returns a duplicate of the HPViewHistoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (hvh *HPViewHistoryQuery) CollectFields(ctx context.Context, satisfies ...string) (*HPViewHistoryQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (hvhq *HPViewHistoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (hvhq *HPViewHistoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (hvhq *HPViewHistoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (hvhq *HPViewHistoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (hvhq *HPViewHistoryQuery) Filter() *HPViewHistoryFilter
Filter returns a Filter implementation to apply filters on the HPViewHistoryQuery builder.
func (hvhq *HPViewHistoryQuery) First(ctx context.Context) (*HPViewHistory, error)
First returns the first HPViewHistory entity from the query. Returns a *NotFoundError when no HPViewHistory was found.
func (hvhq *HPViewHistoryQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first HPViewHistory ID from the query. Returns a *NotFoundError when no HPViewHistory ID was found.
func (hvhq *HPViewHistoryQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (hvhq *HPViewHistoryQuery) FirstX(ctx context.Context) *HPViewHistory
FirstX is like First, but panics if an error occurs.
func (hvhq *HPViewHistoryQuery) GroupBy(field string, fields ...string) *HPViewHistoryGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.HPViewHistory.Query().
GroupBy(hpviewhistory.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (hvhq *HPViewHistoryQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of HPViewHistory IDs.
func (hvhq *HPViewHistoryQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (hvhq *HPViewHistoryQuery) Limit(limit int) *HPViewHistoryQuery
Limit the number of records to be returned by this query.
func (hvhq *HPViewHistoryQuery) Offset(offset int) *HPViewHistoryQuery
Offset to start from.
func (hvhq *HPViewHistoryQuery) Only(ctx context.Context) (*HPViewHistory, error)
Only returns a single HPViewHistory entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HPViewHistory entity is found. Returns a *NotFoundError when no HPViewHistory entities are found.
func (hvhq *HPViewHistoryQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only HPViewHistory ID in the query. Returns a *NotSingularError when more than one HPViewHistory ID is found. Returns a *NotFoundError when no entities are found.
func (hvhq *HPViewHistoryQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (hvhq *HPViewHistoryQuery) OnlyX(ctx context.Context) *HPViewHistory
OnlyX is like Only, but panics if an error occurs.
func (hvhq *HPViewHistoryQuery) Order(o ...hpviewhistory.Order) *HPViewHistoryQuery
Order specifies how the records should be ordered.
func (hvh *HPViewHistoryQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...HPViewHistoryPaginateOption, ) (*HPViewHistoryConnection, error)
Paginate executes the query and returns a relay based cursor connection to HPViewHistory.
func (hvhq *HPViewHistoryQuery) QueryFeed() *HPFeedItemQuery
QueryFeed chains the current query on the "feed" edge.
func (hvhq *HPViewHistoryQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (hvhq *HPViewHistoryQuery) Select(fields ...string) *HPViewHistorySelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.HPViewHistory.Query().
Select(hpviewhistory.FieldCreatedAt).
Scan(ctx, &v)
func (hvhq *HPViewHistoryQuery) Unique(unique bool) *HPViewHistoryQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (hvhq *HPViewHistoryQuery) Where(ps ...predicate.HPViewHistory) *HPViewHistoryQuery
Where adds a new predicate for the HPViewHistoryQuery builder.
func (hvhq *HPViewHistoryQuery) WithFeed(opts ...func(*HPFeedItemQuery)) *HPViewHistoryQuery
WithFeed tells the query-builder to eager-load the nodes that are connected to the "feed" edge. The optional arguments are used to configure the query builder of the edge.
func (hvhq *HPViewHistoryQuery) WithUser(opts ...func(*UserQuery)) *HPViewHistoryQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
HPViewHistorySelect is the builder for selecting fields of HPViewHistory entities.
type HPViewHistorySelect struct {
*HPViewHistoryQuery
// contains filtered or unexported fields
}
func (hvhs *HPViewHistorySelect) Aggregate(fns ...AggregateFunc) *HPViewHistorySelect
Aggregate adds the given aggregation functions to the selector query.
func (s *HPViewHistorySelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *HPViewHistorySelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *HPViewHistorySelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *HPViewHistorySelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *HPViewHistorySelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *HPViewHistorySelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *HPViewHistorySelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *HPViewHistorySelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *HPViewHistorySelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *HPViewHistorySelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *HPViewHistorySelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *HPViewHistorySelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (hvhs *HPViewHistorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *HPViewHistorySelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *HPViewHistorySelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *HPViewHistorySelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *HPViewHistorySelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *HPViewHistorySelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
HPViewHistoryUpdate is the builder for updating HPViewHistory entities.
type HPViewHistoryUpdate struct {
// contains filtered or unexported fields
}
func (hvhu *HPViewHistoryUpdate) AddContentID(i int) *HPViewHistoryUpdate
AddContentID adds i to the "content_id" field.
func (hvhu *HPViewHistoryUpdate) ClearFeed() *HPViewHistoryUpdate
ClearFeed clears the "feed" edge to the HPFeedItem entity.
func (hvhu *HPViewHistoryUpdate) ClearUpdatedAt() *HPViewHistoryUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (hvhu *HPViewHistoryUpdate) ClearUser() *HPViewHistoryUpdate
ClearUser clears the "user" edge to the User entity.
func (hvhu *HPViewHistoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (hvhu *HPViewHistoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hvhu *HPViewHistoryUpdate) Mutation() *HPViewHistoryMutation
Mutation returns the HPViewHistoryMutation object of the builder.
func (hvhu *HPViewHistoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (hvhu *HPViewHistoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (hvhu *HPViewHistoryUpdate) SetAssetType(eat enums.HPAssetType) *HPViewHistoryUpdate
SetAssetType sets the "asset_type" field.
func (hvhu *HPViewHistoryUpdate) SetContentID(i int) *HPViewHistoryUpdate
SetContentID sets the "content_id" field.
func (hvhu *HPViewHistoryUpdate) SetContentPostAt(t time.Time) *HPViewHistoryUpdate
SetContentPostAt sets the "content_post_at" field.
func (hvhu *HPViewHistoryUpdate) SetFeed(h *HPFeedItem) *HPViewHistoryUpdate
SetFeed sets the "feed" edge to the HPFeedItem entity.
func (hvhu *HPViewHistoryUpdate) SetFeedID(id int) *HPViewHistoryUpdate
SetFeedID sets the "feed" edge to the HPFeedItem entity by ID.
func (hvhu *HPViewHistoryUpdate) SetIsFavorite(b bool) *HPViewHistoryUpdate
SetIsFavorite sets the "is_favorite" field.
func (hvhu *HPViewHistoryUpdate) SetNillableFeedID(id *int) *HPViewHistoryUpdate
SetNillableFeedID sets the "feed" edge to the HPFeedItem entity by ID if the given value is not nil.
func (hvhu *HPViewHistoryUpdate) SetNillableIsFavorite(b *bool) *HPViewHistoryUpdate
SetNillableIsFavorite sets the "is_favorite" field if the given value is not nil.
func (hvhu *HPViewHistoryUpdate) SetNillableUpdatedAt(t *time.Time) *HPViewHistoryUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hvhu *HPViewHistoryUpdate) SetOwnerUserID(i int) *HPViewHistoryUpdate
SetOwnerUserID sets the "owner_user_id" field.
func (hvhu *HPViewHistoryUpdate) SetUpdatedAt(t time.Time) *HPViewHistoryUpdate
SetUpdatedAt sets the "updated_at" field.
func (hvhu *HPViewHistoryUpdate) SetUser(u *User) *HPViewHistoryUpdate
SetUser sets the "user" edge to the User entity.
func (hvhu *HPViewHistoryUpdate) SetUserID(id int) *HPViewHistoryUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (hvhu *HPViewHistoryUpdate) Where(ps ...predicate.HPViewHistory) *HPViewHistoryUpdate
Where appends a list predicates to the HPViewHistoryUpdate builder.
HPViewHistoryUpdateOne is the builder for updating a single HPViewHistory entity.
type HPViewHistoryUpdateOne struct {
// contains filtered or unexported fields
}
func (hvhuo *HPViewHistoryUpdateOne) AddContentID(i int) *HPViewHistoryUpdateOne
AddContentID adds i to the "content_id" field.
func (hvhuo *HPViewHistoryUpdateOne) ClearFeed() *HPViewHistoryUpdateOne
ClearFeed clears the "feed" edge to the HPFeedItem entity.
func (hvhuo *HPViewHistoryUpdateOne) ClearUpdatedAt() *HPViewHistoryUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (hvhuo *HPViewHistoryUpdateOne) ClearUser() *HPViewHistoryUpdateOne
ClearUser clears the "user" edge to the User entity.
func (hvhuo *HPViewHistoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (hvhuo *HPViewHistoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (hvhuo *HPViewHistoryUpdateOne) Mutation() *HPViewHistoryMutation
Mutation returns the HPViewHistoryMutation object of the builder.
func (hvhuo *HPViewHistoryUpdateOne) Save(ctx context.Context) (*HPViewHistory, error)
Save executes the query and returns the updated HPViewHistory entity.
func (hvhuo *HPViewHistoryUpdateOne) SaveX(ctx context.Context) *HPViewHistory
SaveX is like Save, but panics if an error occurs.
func (hvhuo *HPViewHistoryUpdateOne) Select(field string, fields ...string) *HPViewHistoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (hvhuo *HPViewHistoryUpdateOne) SetAssetType(eat enums.HPAssetType) *HPViewHistoryUpdateOne
SetAssetType sets the "asset_type" field.
func (hvhuo *HPViewHistoryUpdateOne) SetContentID(i int) *HPViewHistoryUpdateOne
SetContentID sets the "content_id" field.
func (hvhuo *HPViewHistoryUpdateOne) SetContentPostAt(t time.Time) *HPViewHistoryUpdateOne
SetContentPostAt sets the "content_post_at" field.
func (hvhuo *HPViewHistoryUpdateOne) SetFeed(h *HPFeedItem) *HPViewHistoryUpdateOne
SetFeed sets the "feed" edge to the HPFeedItem entity.
func (hvhuo *HPViewHistoryUpdateOne) SetFeedID(id int) *HPViewHistoryUpdateOne
SetFeedID sets the "feed" edge to the HPFeedItem entity by ID.
func (hvhuo *HPViewHistoryUpdateOne) SetIsFavorite(b bool) *HPViewHistoryUpdateOne
SetIsFavorite sets the "is_favorite" field.
func (hvhuo *HPViewHistoryUpdateOne) SetNillableFeedID(id *int) *HPViewHistoryUpdateOne
SetNillableFeedID sets the "feed" edge to the HPFeedItem entity by ID if the given value is not nil.
func (hvhuo *HPViewHistoryUpdateOne) SetNillableIsFavorite(b *bool) *HPViewHistoryUpdateOne
SetNillableIsFavorite sets the "is_favorite" field if the given value is not nil.
func (hvhuo *HPViewHistoryUpdateOne) SetNillableUpdatedAt(t *time.Time) *HPViewHistoryUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (hvhuo *HPViewHistoryUpdateOne) SetOwnerUserID(i int) *HPViewHistoryUpdateOne
SetOwnerUserID sets the "owner_user_id" field.
func (hvhuo *HPViewHistoryUpdateOne) SetUpdatedAt(t time.Time) *HPViewHistoryUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (hvhuo *HPViewHistoryUpdateOne) SetUser(u *User) *HPViewHistoryUpdateOne
SetUser sets the "user" edge to the User entity.
func (hvhuo *HPViewHistoryUpdateOne) SetUserID(id int) *HPViewHistoryUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (hvhuo *HPViewHistoryUpdateOne) Where(ps ...predicate.HPViewHistory) *HPViewHistoryUpdateOne
Where appends a list predicates to the HPViewHistoryUpdate builder.
HPViewHistoryUpsert is the "OnConflict" setter.
type HPViewHistoryUpsert struct {
*sql.UpdateSet
}
func (u *HPViewHistoryUpsert) AddContentID(v int) *HPViewHistoryUpsert
AddContentID adds v to the "content_id" field.
func (u *HPViewHistoryUpsert) ClearUpdatedAt() *HPViewHistoryUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPViewHistoryUpsert) SetAssetType(v enums.HPAssetType) *HPViewHistoryUpsert
SetAssetType sets the "asset_type" field.
func (u *HPViewHistoryUpsert) SetContentID(v int) *HPViewHistoryUpsert
SetContentID sets the "content_id" field.
func (u *HPViewHistoryUpsert) SetContentPostAt(v time.Time) *HPViewHistoryUpsert
SetContentPostAt sets the "content_post_at" field.
func (u *HPViewHistoryUpsert) SetIsFavorite(v bool) *HPViewHistoryUpsert
SetIsFavorite sets the "is_favorite" field.
func (u *HPViewHistoryUpsert) SetOwnerUserID(v int) *HPViewHistoryUpsert
SetOwnerUserID sets the "owner_user_id" field.
func (u *HPViewHistoryUpsert) SetUpdatedAt(v time.Time) *HPViewHistoryUpsert
SetUpdatedAt sets the "updated_at" field.
func (u *HPViewHistoryUpsert) UpdateAssetType() *HPViewHistoryUpsert
UpdateAssetType sets the "asset_type" field to the value that was provided on create.
func (u *HPViewHistoryUpsert) UpdateContentID() *HPViewHistoryUpsert
UpdateContentID sets the "content_id" field to the value that was provided on create.
func (u *HPViewHistoryUpsert) UpdateContentPostAt() *HPViewHistoryUpsert
UpdateContentPostAt sets the "content_post_at" field to the value that was provided on create.
func (u *HPViewHistoryUpsert) UpdateIsFavorite() *HPViewHistoryUpsert
UpdateIsFavorite sets the "is_favorite" field to the value that was provided on create.
func (u *HPViewHistoryUpsert) UpdateOwnerUserID() *HPViewHistoryUpsert
UpdateOwnerUserID sets the "owner_user_id" field to the value that was provided on create.
func (u *HPViewHistoryUpsert) UpdateUpdatedAt() *HPViewHistoryUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPViewHistoryUpsertBulk is the builder for "upsert"-ing a bulk of HPViewHistory nodes.
type HPViewHistoryUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *HPViewHistoryUpsertBulk) AddContentID(v int) *HPViewHistoryUpsertBulk
AddContentID adds v to the "content_id" field.
func (u *HPViewHistoryUpsertBulk) ClearUpdatedAt() *HPViewHistoryUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPViewHistoryUpsertBulk) DoNothing() *HPViewHistoryUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPViewHistoryUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPViewHistoryUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPViewHistoryUpsertBulk) Ignore() *HPViewHistoryUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPViewHistory.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *HPViewHistoryUpsertBulk) SetAssetType(v enums.HPAssetType) *HPViewHistoryUpsertBulk
SetAssetType sets the "asset_type" field.
func (u *HPViewHistoryUpsertBulk) SetContentID(v int) *HPViewHistoryUpsertBulk
SetContentID sets the "content_id" field.
func (u *HPViewHistoryUpsertBulk) SetContentPostAt(v time.Time) *HPViewHistoryUpsertBulk
SetContentPostAt sets the "content_post_at" field.
func (u *HPViewHistoryUpsertBulk) SetIsFavorite(v bool) *HPViewHistoryUpsertBulk
SetIsFavorite sets the "is_favorite" field.
func (u *HPViewHistoryUpsertBulk) SetOwnerUserID(v int) *HPViewHistoryUpsertBulk
SetOwnerUserID sets the "owner_user_id" field.
func (u *HPViewHistoryUpsertBulk) SetUpdatedAt(v time.Time) *HPViewHistoryUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (u *HPViewHistoryUpsertBulk) Update(set func(*HPViewHistoryUpsert)) *HPViewHistoryUpsertBulk
Update allows overriding fields `UPDATE` values. See the HPViewHistoryCreateBulk.OnConflict documentation for more info.
func (u *HPViewHistoryUpsertBulk) UpdateAssetType() *HPViewHistoryUpsertBulk
UpdateAssetType sets the "asset_type" field to the value that was provided on create.
func (u *HPViewHistoryUpsertBulk) UpdateContentID() *HPViewHistoryUpsertBulk
UpdateContentID sets the "content_id" field to the value that was provided on create.
func (u *HPViewHistoryUpsertBulk) UpdateContentPostAt() *HPViewHistoryUpsertBulk
UpdateContentPostAt sets the "content_post_at" field to the value that was provided on create.
func (u *HPViewHistoryUpsertBulk) UpdateIsFavorite() *HPViewHistoryUpsertBulk
UpdateIsFavorite sets the "is_favorite" field to the value that was provided on create.
func (u *HPViewHistoryUpsertBulk) UpdateNewValues() *HPViewHistoryUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPViewHistory.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPViewHistoryUpsertBulk) UpdateOwnerUserID() *HPViewHistoryUpsertBulk
UpdateOwnerUserID sets the "owner_user_id" field to the value that was provided on create.
func (u *HPViewHistoryUpsertBulk) UpdateUpdatedAt() *HPViewHistoryUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
HPViewHistoryUpsertOne is the builder for "upsert"-ing
one HPViewHistory node.
type HPViewHistoryUpsertOne struct {
// contains filtered or unexported fields
}
func (u *HPViewHistoryUpsertOne) AddContentID(v int) *HPViewHistoryUpsertOne
AddContentID adds v to the "content_id" field.
func (u *HPViewHistoryUpsertOne) ClearUpdatedAt() *HPViewHistoryUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *HPViewHistoryUpsertOne) DoNothing() *HPViewHistoryUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *HPViewHistoryUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *HPViewHistoryUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *HPViewHistoryUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *HPViewHistoryUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *HPViewHistoryUpsertOne) Ignore() *HPViewHistoryUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HPViewHistory.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *HPViewHistoryUpsertOne) SetAssetType(v enums.HPAssetType) *HPViewHistoryUpsertOne
SetAssetType sets the "asset_type" field.
func (u *HPViewHistoryUpsertOne) SetContentID(v int) *HPViewHistoryUpsertOne
SetContentID sets the "content_id" field.
func (u *HPViewHistoryUpsertOne) SetContentPostAt(v time.Time) *HPViewHistoryUpsertOne
SetContentPostAt sets the "content_post_at" field.
func (u *HPViewHistoryUpsertOne) SetIsFavorite(v bool) *HPViewHistoryUpsertOne
SetIsFavorite sets the "is_favorite" field.
func (u *HPViewHistoryUpsertOne) SetOwnerUserID(v int) *HPViewHistoryUpsertOne
SetOwnerUserID sets the "owner_user_id" field.
func (u *HPViewHistoryUpsertOne) SetUpdatedAt(v time.Time) *HPViewHistoryUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (u *HPViewHistoryUpsertOne) Update(set func(*HPViewHistoryUpsert)) *HPViewHistoryUpsertOne
Update allows overriding fields `UPDATE` values. See the HPViewHistoryCreate.OnConflict documentation for more info.
func (u *HPViewHistoryUpsertOne) UpdateAssetType() *HPViewHistoryUpsertOne
UpdateAssetType sets the "asset_type" field to the value that was provided on create.
func (u *HPViewHistoryUpsertOne) UpdateContentID() *HPViewHistoryUpsertOne
UpdateContentID sets the "content_id" field to the value that was provided on create.
func (u *HPViewHistoryUpsertOne) UpdateContentPostAt() *HPViewHistoryUpsertOne
UpdateContentPostAt sets the "content_post_at" field to the value that was provided on create.
func (u *HPViewHistoryUpsertOne) UpdateIsFavorite() *HPViewHistoryUpsertOne
UpdateIsFavorite sets the "is_favorite" field to the value that was provided on create.
func (u *HPViewHistoryUpsertOne) UpdateNewValues() *HPViewHistoryUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HPViewHistory.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *HPViewHistoryUpsertOne) UpdateOwnerUserID() *HPViewHistoryUpsertOne
UpdateOwnerUserID sets the "owner_user_id" field to the value that was provided on create.
func (u *HPViewHistoryUpsertOne) UpdateUpdatedAt() *HPViewHistoryUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
ent aliases to avoid import conflicts in user's code.
type Hook = ent.Hook
ent aliases to avoid import conflicts in user's code.
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type Mutation = ent.Mutation
ent aliases to avoid import conflicts in user's code.
type Mutator = ent.Mutator
NodeOption allows configuring the Noder execution using functional options.
type NodeOption func(*nodeOptions)
func WithFixedNodeType(t string) NodeOption
WithFixedNodeType sets the Type of the node to a fixed value.
func WithNodeType(f func(context.Context, int) (string, error)) NodeOption
WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.
Noder wraps the basic Node method.
type Noder interface {
IsNode()
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
type NotFoundError struct {
// contains filtered or unexported fields
}
func (e *NotFoundError) Error() string
Error implements the error interface.
NotLoadedError returns when trying to get a node that was not loaded by the query.
type NotLoadedError struct {
// contains filtered or unexported fields
}
func (e *NotLoadedError) Error() string
Error implements the error interface.
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
type NotSingularError struct {
// contains filtered or unexported fields
}
func (e *NotSingularError) Error() string
Error implements the error interface.
ent aliases to avoid import conflicts in user's code.
type Op = ent.Op
Option function to configure the client.
type Option func(*config)
func Debug() Option
Debug enables debug logging on the ent.Driver.
func Driver(driver dialect.Driver) Option
Driver configures the client driver.
func Log(fn func(...any)) Option
Log sets the logging function for debug mode.
Common entgql types.
type OrderDirection = entgql.OrderDirection
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type OrderFunc func(*sql.Selector)
Common entgql types.
type PageInfo = entgql.PageInfo[int]
ent aliases to avoid import conflicts in user's code.
type Policy = ent.Policy
ent aliases to avoid import conflicts in user's code.
type Querier = ent.Querier
ent aliases to avoid import conflicts in user's code.
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type Query = ent.Query
ent aliases to avoid import conflicts in user's code.
type QueryContext = ent.QueryContext
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackFunc func(context.Context, *Tx) error
func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error
Rollback calls f(ctx, m).
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker {
return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Rollback(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type RollbackHook func(Rollbacker) Rollbacker
Rollbacker is the interface that wraps the Rollback method.
type Rollbacker interface {
Rollback(context.Context, *Tx) error
}
TestEnt is the model entity for the TestEnt schema.
type TestEnt struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// StringField holds the value of the "string_field" field.
StringField *string `json:"string_field,omitempty"`
// TextField holds the value of the "text_field" field.
TextField *string `json:"text_field,omitempty"`
// BytesField holds the value of the "bytes_field" field.
BytesField *[]byte `json:"bytes_field,omitempty"`
// BoolField holds the value of the "bool_field" field.
BoolField *bool `json:"bool_field,omitempty"`
// TimeField holds the value of the "time_field" field.
TimeField *time.Time `json:"time_field,omitempty"`
// IntField holds the value of the "int_field" field.
IntField *int `json:"int_field,omitempty"`
// Int64Field holds the value of the "int64_field" field.
Int64Field *int64 `json:"int64_field,omitempty"`
// FloatField holds the value of the "float_field" field.
FloatField *float64 `json:"float_field,omitempty"`
// JSONField holds the value of the "json_field" field.
JSONField *jsonfields.TestJSON `json:"json_field,omitempty"`
// EnumField holds the value of the "enum_field" field.
EnumField enums.TestEnum `json:"enum_field,omitempty"`
// contains filtered or unexported fields
}
func (te *TestEnt) String() string
String implements the fmt.Stringer.
func (te *TestEnt) Unwrap() *TestEnt
Unwrap unwraps the TestEnt entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (te *TestEnt) Update() *TestEntUpdateOne
Update returns a builder for updating this TestEnt. Note that you need to call TestEnt.Unwrap() before calling this method if this TestEnt was returned from a transaction, and the transaction was committed or rolled back.
func (te *TestEnt) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the TestEnt. This includes values selected through modifiers, order, etc.
TestEntClient is a client for the TestEnt schema.
type TestEntClient struct {
// contains filtered or unexported fields
}
func NewTestEntClient(c config) *TestEntClient
NewTestEntClient returns a client for the TestEnt from the given config.
func (c *TestEntClient) Create() *TestEntCreate
Create returns a builder for creating a TestEnt entity.
func (c *TestEntClient) CreateBulk(builders ...*TestEntCreate) *TestEntCreateBulk
CreateBulk returns a builder for creating a bulk of TestEnt entities.
func (c *TestEntClient) Delete() *TestEntDelete
Delete returns a delete builder for TestEnt.
func (c *TestEntClient) DeleteOne(te *TestEnt) *TestEntDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *TestEntClient) DeleteOneID(id int) *TestEntDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *TestEntClient) Get(ctx context.Context, id int) (*TestEnt, error)
Get returns a TestEnt entity by its id.
func (c *TestEntClient) GetX(ctx context.Context, id int) *TestEnt
GetX is like Get, but panics if an error occurs.
func (c *TestEntClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *TestEntClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `testent.Intercept(f(g(h())))`.
func (c *TestEntClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *TestEntClient) Query() *TestEntQuery
Query returns a query builder for TestEnt.
func (c *TestEntClient) Update() *TestEntUpdate
Update returns an update builder for TestEnt.
func (c *TestEntClient) UpdateOne(te *TestEnt) *TestEntUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *TestEntClient) UpdateOneID(id int) *TestEntUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *TestEntClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `testent.Hooks(f(g(h())))`.
TestEntCreate is the builder for creating a TestEnt entity.
type TestEntCreate struct {
// contains filtered or unexported fields
}
func (tec *TestEntCreate) Exec(ctx context.Context) error
Exec executes the query.
func (tec *TestEntCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (tec *TestEntCreate) Mutation() *TestEntMutation
Mutation returns the TestEntMutation object of the builder.
func (tec *TestEntCreate) OnConflict(opts ...sql.ConflictOption) *TestEntUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.TestEnt.Create().
SetStringField(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.TestEntUpsert) {
SetStringField(v+v).
}).
Exec(ctx)
func (tec *TestEntCreate) OnConflictColumns(columns ...string) *TestEntUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.TestEnt.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (tec *TestEntCreate) Save(ctx context.Context) (*TestEnt, error)
Save creates the TestEnt in the database.
func (tec *TestEntCreate) SaveX(ctx context.Context) *TestEnt
SaveX calls Save and panics if Save returns an error.
func (tec *TestEntCreate) SetBoolField(b bool) *TestEntCreate
SetBoolField sets the "bool_field" field.
func (tec *TestEntCreate) SetBytesField(b []byte) *TestEntCreate
SetBytesField sets the "bytes_field" field.
func (tec *TestEntCreate) SetEnumField(ee enums.TestEnum) *TestEntCreate
SetEnumField sets the "enum_field" field.
func (tec *TestEntCreate) SetFloatField(f float64) *TestEntCreate
SetFloatField sets the "float_field" field.
func (tec *TestEntCreate) SetInt64Field(i int64) *TestEntCreate
SetInt64Field sets the "int64_field" field.
func (tec *TestEntCreate) SetIntField(i int) *TestEntCreate
SetIntField sets the "int_field" field.
func (tec *TestEntCreate) SetJSONField(jj *jsonfields.TestJSON) *TestEntCreate
SetJSONField sets the "json_field" field.
func (tec *TestEntCreate) SetNillableBoolField(b *bool) *TestEntCreate
SetNillableBoolField sets the "bool_field" field if the given value is not nil.
func (tec *TestEntCreate) SetNillableEnumField(ee *enums.TestEnum) *TestEntCreate
SetNillableEnumField sets the "enum_field" field if the given value is not nil.
func (tec *TestEntCreate) SetNillableFloatField(f *float64) *TestEntCreate
SetNillableFloatField sets the "float_field" field if the given value is not nil.
func (tec *TestEntCreate) SetNillableInt64Field(i *int64) *TestEntCreate
SetNillableInt64Field sets the "int64_field" field if the given value is not nil.
func (tec *TestEntCreate) SetNillableIntField(i *int) *TestEntCreate
SetNillableIntField sets the "int_field" field if the given value is not nil.
func (tec *TestEntCreate) SetNillableStringField(s *string) *TestEntCreate
SetNillableStringField sets the "string_field" field if the given value is not nil.
func (tec *TestEntCreate) SetNillableTextField(s *string) *TestEntCreate
SetNillableTextField sets the "text_field" field if the given value is not nil.
func (tec *TestEntCreate) SetNillableTimeField(t *time.Time) *TestEntCreate
SetNillableTimeField sets the "time_field" field if the given value is not nil.
func (tec *TestEntCreate) SetStringField(s string) *TestEntCreate
SetStringField sets the "string_field" field.
func (tec *TestEntCreate) SetTextField(s string) *TestEntCreate
SetTextField sets the "text_field" field.
func (tec *TestEntCreate) SetTimeField(t time.Time) *TestEntCreate
SetTimeField sets the "time_field" field.
TestEntCreateBulk is the builder for creating many TestEnt entities in bulk.
type TestEntCreateBulk struct {
// contains filtered or unexported fields
}
func (tecb *TestEntCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (tecb *TestEntCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (tecb *TestEntCreateBulk) OnConflict(opts ...sql.ConflictOption) *TestEntUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.TestEnt.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.TestEntUpsert) {
SetStringField(v+v).
}).
Exec(ctx)
func (tecb *TestEntCreateBulk) OnConflictColumns(columns ...string) *TestEntUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.TestEnt.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (tecb *TestEntCreateBulk) Save(ctx context.Context) ([]*TestEnt, error)
Save creates the TestEnt entities in the database.
func (tecb *TestEntCreateBulk) SaveX(ctx context.Context) []*TestEnt
SaveX is like Save, but panics if an error occurs.
TestEntDelete is the builder for deleting a TestEnt entity.
type TestEntDelete struct {
// contains filtered or unexported fields
}
func (ted *TestEntDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (ted *TestEntDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (ted *TestEntDelete) Where(ps ...predicate.TestEnt) *TestEntDelete
Where appends a list predicates to the TestEntDelete builder.
TestEntDeleteOne is the builder for deleting a single TestEnt entity.
type TestEntDeleteOne struct {
// contains filtered or unexported fields
}
func (tedo *TestEntDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (tedo *TestEntDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (tedo *TestEntDeleteOne) Where(ps ...predicate.TestEnt) *TestEntDeleteOne
Where appends a list predicates to the TestEntDelete builder.
TestEntFilter provides a generic filtering capability at runtime for TestEntQuery.
type TestEntFilter struct {
// contains filtered or unexported fields
}
func (f *TestEntFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *TestEntFilter) WhereBoolField(p entql.BoolP)
WhereBoolField applies the entql bool predicate on the bool_field field.
func (f *TestEntFilter) WhereBytesField(p entql.BytesP)
WhereBytesField applies the entql []byte predicate on the bytes_field field.
func (f *TestEntFilter) WhereEnumField(p entql.StringP)
WhereEnumField applies the entql string predicate on the enum_field field.
func (f *TestEntFilter) WhereFloatField(p entql.Float64P)
WhereFloatField applies the entql float64 predicate on the float_field field.
func (f *TestEntFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *TestEntFilter) WhereInt64Field(p entql.Int64P)
WhereInt64Field applies the entql int64 predicate on the int64_field field.
func (f *TestEntFilter) WhereIntField(p entql.IntP)
WhereIntField applies the entql int predicate on the int_field field.
func (f *TestEntFilter) WhereJSONField(p entql.BytesP)
WhereJSONField applies the entql json.RawMessage predicate on the json_field field.
func (f *TestEntFilter) WhereStringField(p entql.StringP)
WhereStringField applies the entql string predicate on the string_field field.
func (f *TestEntFilter) WhereTextField(p entql.StringP)
WhereTextField applies the entql string predicate on the text_field field.
func (f *TestEntFilter) WhereTimeField(p entql.TimeP)
WhereTimeField applies the entql time.Time predicate on the time_field field.
TestEntGroupBy is the group-by builder for TestEnt entities.
type TestEntGroupBy struct {
// contains filtered or unexported fields
}
func (tegb *TestEntGroupBy) Aggregate(fns ...AggregateFunc) *TestEntGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *TestEntGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *TestEntGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *TestEntGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *TestEntGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *TestEntGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *TestEntGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *TestEntGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *TestEntGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *TestEntGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *TestEntGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *TestEntGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *TestEntGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (tegb *TestEntGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *TestEntGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *TestEntGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *TestEntGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *TestEntGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *TestEntGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
TestEntMutation represents an operation that mutates the TestEnt nodes in the graph.
type TestEntMutation struct {
// contains filtered or unexported fields
}
func (m *TestEntMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *TestEntMutation) AddFloatField(f float64)
AddFloatField adds f to the "float_field" field.
func (m *TestEntMutation) AddInt64Field(i int64)
AddInt64Field adds i to the "int64_field" field.
func (m *TestEntMutation) AddIntField(i int)
AddIntField adds i to the "int_field" field.
func (m *TestEntMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *TestEntMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *TestEntMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *TestEntMutation) AddedFloatField() (r float64, exists bool)
AddedFloatField returns the value that was added to the "float_field" field in this mutation.
func (m *TestEntMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *TestEntMutation) AddedInt64Field() (r int64, exists bool)
AddedInt64Field returns the value that was added to the "int64_field" field in this mutation.
func (m *TestEntMutation) AddedIntField() (r int, exists bool)
AddedIntField returns the value that was added to the "int_field" field in this mutation.
func (m *TestEntMutation) BoolField() (r bool, exists bool)
BoolField returns the value of the "bool_field" field in the mutation.
func (m *TestEntMutation) BoolFieldCleared() bool
BoolFieldCleared returns if the "bool_field" field was cleared in this mutation.
func (m *TestEntMutation) BytesField() (r []byte, exists bool)
BytesField returns the value of the "bytes_field" field in the mutation.
func (m *TestEntMutation) BytesFieldCleared() bool
BytesFieldCleared returns if the "bytes_field" field was cleared in this mutation.
func (m *TestEntMutation) ClearBoolField()
ClearBoolField clears the value of the "bool_field" field.
func (m *TestEntMutation) ClearBytesField()
ClearBytesField clears the value of the "bytes_field" field.
func (m *TestEntMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *TestEntMutation) ClearEnumField()
ClearEnumField clears the value of the "enum_field" field.
func (m *TestEntMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *TestEntMutation) ClearFloatField()
ClearFloatField clears the value of the "float_field" field.
func (m *TestEntMutation) ClearInt64Field()
ClearInt64Field clears the value of the "int64_field" field.
func (m *TestEntMutation) ClearIntField()
ClearIntField clears the value of the "int_field" field.
func (m *TestEntMutation) ClearJSONField()
ClearJSONField clears the value of the "json_field" field.
func (m *TestEntMutation) ClearStringField()
ClearStringField clears the value of the "string_field" field.
func (m *TestEntMutation) ClearTextField()
ClearTextField clears the value of the "text_field" field.
func (m *TestEntMutation) ClearTimeField()
ClearTimeField clears the value of the "time_field" field.
func (m *TestEntMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *TestEntMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m TestEntMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *TestEntMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *TestEntMutation) EnumField() (r enums.TestEnum, exists bool)
EnumField returns the value of the "enum_field" field in the mutation.
func (m *TestEntMutation) EnumFieldCleared() bool
EnumFieldCleared returns if the "enum_field" field was cleared in this mutation.
func (m *TestEntMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *TestEntMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *TestEntMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *TestEntMutation) Filter() *TestEntFilter
Filter returns an entql.Where implementation to apply filters on the TestEntMutation builder.
func (m *TestEntMutation) FloatField() (r float64, exists bool)
FloatField returns the value of the "float_field" field in the mutation.
func (m *TestEntMutation) FloatFieldCleared() bool
FloatFieldCleared returns if the "float_field" field was cleared in this mutation.
func (m *TestEntMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *TestEntMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *TestEntMutation) Int64Field() (r int64, exists bool)
Int64Field returns the value of the "int64_field" field in the mutation.
func (m *TestEntMutation) Int64FieldCleared() bool
Int64FieldCleared returns if the "int64_field" field was cleared in this mutation.
func (m *TestEntMutation) IntField() (r int, exists bool)
IntField returns the value of the "int_field" field in the mutation.
func (m *TestEntMutation) IntFieldCleared() bool
IntFieldCleared returns if the "int_field" field was cleared in this mutation.
func (m *TestEntMutation) JSONField() (r *jsonfields.TestJSON, exists bool)
JSONField returns the value of the "json_field" field in the mutation.
func (m *TestEntMutation) JSONFieldCleared() bool
JSONFieldCleared returns if the "json_field" field was cleared in this mutation.
func (m *TestEntMutation) OldBoolField(ctx context.Context) (v *bool, err error)
OldBoolField returns the old "bool_field" field's value of the TestEnt entity. If the TestEnt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *TestEntMutation) OldBytesField(ctx context.Context) (v *[]byte, err error)
OldBytesField returns the old "bytes_field" field's value of the TestEnt entity. If the TestEnt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *TestEntMutation) OldEnumField(ctx context.Context) (v enums.TestEnum, err error)
OldEnumField returns the old "enum_field" field's value of the TestEnt entity. If the TestEnt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *TestEntMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *TestEntMutation) OldFloatField(ctx context.Context) (v *float64, err error)
OldFloatField returns the old "float_field" field's value of the TestEnt entity. If the TestEnt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *TestEntMutation) OldInt64Field(ctx context.Context) (v *int64, err error)
OldInt64Field returns the old "int64_field" field's value of the TestEnt entity. If the TestEnt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *TestEntMutation) OldIntField(ctx context.Context) (v *int, err error)
OldIntField returns the old "int_field" field's value of the TestEnt entity. If the TestEnt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *TestEntMutation) OldJSONField(ctx context.Context) (v *jsonfields.TestJSON, err error)
OldJSONField returns the old "json_field" field's value of the TestEnt entity. If the TestEnt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *TestEntMutation) OldStringField(ctx context.Context) (v *string, err error)
OldStringField returns the old "string_field" field's value of the TestEnt entity. If the TestEnt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *TestEntMutation) OldTextField(ctx context.Context) (v *string, err error)
OldTextField returns the old "text_field" field's value of the TestEnt entity. If the TestEnt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *TestEntMutation) OldTimeField(ctx context.Context) (v *time.Time, err error)
OldTimeField returns the old "time_field" field's value of the TestEnt entity. If the TestEnt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *TestEntMutation) Op() Op
Op returns the operation name.
func (m *TestEntMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *TestEntMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *TestEntMutation) ResetBoolField()
ResetBoolField resets all changes to the "bool_field" field.
func (m *TestEntMutation) ResetBytesField()
ResetBytesField resets all changes to the "bytes_field" field.
func (m *TestEntMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *TestEntMutation) ResetEnumField()
ResetEnumField resets all changes to the "enum_field" field.
func (m *TestEntMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *TestEntMutation) ResetFloatField()
ResetFloatField resets all changes to the "float_field" field.
func (m *TestEntMutation) ResetInt64Field()
ResetInt64Field resets all changes to the "int64_field" field.
func (m *TestEntMutation) ResetIntField()
ResetIntField resets all changes to the "int_field" field.
func (m *TestEntMutation) ResetJSONField()
ResetJSONField resets all changes to the "json_field" field.
func (m *TestEntMutation) ResetStringField()
ResetStringField resets all changes to the "string_field" field.
func (m *TestEntMutation) ResetTextField()
ResetTextField resets all changes to the "text_field" field.
func (m *TestEntMutation) ResetTimeField()
ResetTimeField resets all changes to the "time_field" field.
func (m *TestEntMutation) SetBoolField(b bool)
SetBoolField sets the "bool_field" field.
func (m *TestEntMutation) SetBytesField(b []byte)
SetBytesField sets the "bytes_field" field.
func (m *TestEntMutation) SetEnumField(ee enums.TestEnum)
SetEnumField sets the "enum_field" field.
func (m *TestEntMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *TestEntMutation) SetFloatField(f float64)
SetFloatField sets the "float_field" field.
func (m *TestEntMutation) SetInt64Field(i int64)
SetInt64Field sets the "int64_field" field.
func (m *TestEntMutation) SetIntField(i int)
SetIntField sets the "int_field" field.
func (m *TestEntMutation) SetJSONField(jj *jsonfields.TestJSON)
SetJSONField sets the "json_field" field.
func (m *TestEntMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *TestEntMutation) SetStringField(s string)
SetStringField sets the "string_field" field.
func (m *TestEntMutation) SetTextField(s string)
SetTextField sets the "text_field" field.
func (m *TestEntMutation) SetTimeField(t time.Time)
SetTimeField sets the "time_field" field.
func (m *TestEntMutation) StringField() (r string, exists bool)
StringField returns the value of the "string_field" field in the mutation.
func (m *TestEntMutation) StringFieldCleared() bool
StringFieldCleared returns if the "string_field" field was cleared in this mutation.
func (m *TestEntMutation) TextField() (r string, exists bool)
TextField returns the value of the "text_field" field in the mutation.
func (m *TestEntMutation) TextFieldCleared() bool
TextFieldCleared returns if the "text_field" field was cleared in this mutation.
func (m *TestEntMutation) TimeField() (r time.Time, exists bool)
TimeField returns the value of the "time_field" field in the mutation.
func (m *TestEntMutation) TimeFieldCleared() bool
TimeFieldCleared returns if the "time_field" field was cleared in this mutation.
func (m TestEntMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *TestEntMutation) Type() string
Type returns the node type of this mutation (TestEnt).
func (m *TestEntMutation) Where(ps ...predicate.TestEnt)
Where appends a list predicates to the TestEntMutation builder.
func (m *TestEntMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TestEntMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
TestEntQuery is the builder for querying TestEnt entities.
type TestEntQuery struct {
// contains filtered or unexported fields
}
func (teq *TestEntQuery) Aggregate(fns ...AggregateFunc) *TestEntSelect
Aggregate returns a TestEntSelect configured with the given aggregations.
func (teq *TestEntQuery) All(ctx context.Context) ([]*TestEnt, error)
All executes the query and returns a list of TestEnts.
func (teq *TestEntQuery) AllX(ctx context.Context) []*TestEnt
AllX is like All, but panics if an error occurs.
func (teq *TestEntQuery) Clone() *TestEntQuery
Clone returns a duplicate of the TestEntQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (teq *TestEntQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (teq *TestEntQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (teq *TestEntQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (teq *TestEntQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (teq *TestEntQuery) Filter() *TestEntFilter
Filter returns a Filter implementation to apply filters on the TestEntQuery builder.
func (teq *TestEntQuery) First(ctx context.Context) (*TestEnt, error)
First returns the first TestEnt entity from the query. Returns a *NotFoundError when no TestEnt was found.
func (teq *TestEntQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first TestEnt ID from the query. Returns a *NotFoundError when no TestEnt ID was found.
func (teq *TestEntQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (teq *TestEntQuery) FirstX(ctx context.Context) *TestEnt
FirstX is like First, but panics if an error occurs.
func (teq *TestEntQuery) GroupBy(field string, fields ...string) *TestEntGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
StringField string `json:"string_field,omitempty"`
Count int `json:"count,omitempty"`
}
client.TestEnt.Query().
GroupBy(testent.FieldStringField).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (teq *TestEntQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of TestEnt IDs.
func (teq *TestEntQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (teq *TestEntQuery) Limit(limit int) *TestEntQuery
Limit the number of records to be returned by this query.
func (teq *TestEntQuery) Offset(offset int) *TestEntQuery
Offset to start from.
func (teq *TestEntQuery) Only(ctx context.Context) (*TestEnt, error)
Only returns a single TestEnt entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TestEnt entity is found. Returns a *NotFoundError when no TestEnt entities are found.
func (teq *TestEntQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only TestEnt ID in the query. Returns a *NotSingularError when more than one TestEnt ID is found. Returns a *NotFoundError when no entities are found.
func (teq *TestEntQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (teq *TestEntQuery) OnlyX(ctx context.Context) *TestEnt
OnlyX is like Only, but panics if an error occurs.
func (teq *TestEntQuery) Order(o ...testent.Order) *TestEntQuery
Order specifies how the records should be ordered.
func (teq *TestEntQuery) Select(fields ...string) *TestEntSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
StringField string `json:"string_field,omitempty"`
}
client.TestEnt.Query().
Select(testent.FieldStringField).
Scan(ctx, &v)
func (teq *TestEntQuery) Unique(unique bool) *TestEntQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (teq *TestEntQuery) Where(ps ...predicate.TestEnt) *TestEntQuery
Where adds a new predicate for the TestEntQuery builder.
TestEntSelect is the builder for selecting fields of TestEnt entities.
type TestEntSelect struct {
*TestEntQuery
// contains filtered or unexported fields
}
func (tes *TestEntSelect) Aggregate(fns ...AggregateFunc) *TestEntSelect
Aggregate adds the given aggregation functions to the selector query.
func (s *TestEntSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *TestEntSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *TestEntSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *TestEntSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *TestEntSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *TestEntSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *TestEntSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *TestEntSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *TestEntSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *TestEntSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *TestEntSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *TestEntSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (tes *TestEntSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *TestEntSelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *TestEntSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *TestEntSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *TestEntSelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *TestEntSelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
TestEntUpdate is the builder for updating TestEnt entities.
type TestEntUpdate struct {
// contains filtered or unexported fields
}
func (teu *TestEntUpdate) AddFloatField(f float64) *TestEntUpdate
AddFloatField adds f to the "float_field" field.
func (teu *TestEntUpdate) AddInt64Field(i int64) *TestEntUpdate
AddInt64Field adds i to the "int64_field" field.
func (teu *TestEntUpdate) AddIntField(i int) *TestEntUpdate
AddIntField adds i to the "int_field" field.
func (teu *TestEntUpdate) ClearBoolField() *TestEntUpdate
ClearBoolField clears the value of the "bool_field" field.
func (teu *TestEntUpdate) ClearBytesField() *TestEntUpdate
ClearBytesField clears the value of the "bytes_field" field.
func (teu *TestEntUpdate) ClearEnumField() *TestEntUpdate
ClearEnumField clears the value of the "enum_field" field.
func (teu *TestEntUpdate) ClearFloatField() *TestEntUpdate
ClearFloatField clears the value of the "float_field" field.
func (teu *TestEntUpdate) ClearInt64Field() *TestEntUpdate
ClearInt64Field clears the value of the "int64_field" field.
func (teu *TestEntUpdate) ClearIntField() *TestEntUpdate
ClearIntField clears the value of the "int_field" field.
func (teu *TestEntUpdate) ClearJSONField() *TestEntUpdate
ClearJSONField clears the value of the "json_field" field.
func (teu *TestEntUpdate) ClearStringField() *TestEntUpdate
ClearStringField clears the value of the "string_field" field.
func (teu *TestEntUpdate) ClearTextField() *TestEntUpdate
ClearTextField clears the value of the "text_field" field.
func (teu *TestEntUpdate) ClearTimeField() *TestEntUpdate
ClearTimeField clears the value of the "time_field" field.
func (teu *TestEntUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (teu *TestEntUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (teu *TestEntUpdate) Mutation() *TestEntMutation
Mutation returns the TestEntMutation object of the builder.
func (teu *TestEntUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (teu *TestEntUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (teu *TestEntUpdate) SetBoolField(b bool) *TestEntUpdate
SetBoolField sets the "bool_field" field.
func (teu *TestEntUpdate) SetBytesField(b []byte) *TestEntUpdate
SetBytesField sets the "bytes_field" field.
func (teu *TestEntUpdate) SetEnumField(ee enums.TestEnum) *TestEntUpdate
SetEnumField sets the "enum_field" field.
func (teu *TestEntUpdate) SetFloatField(f float64) *TestEntUpdate
SetFloatField sets the "float_field" field.
func (teu *TestEntUpdate) SetInt64Field(i int64) *TestEntUpdate
SetInt64Field sets the "int64_field" field.
func (teu *TestEntUpdate) SetIntField(i int) *TestEntUpdate
SetIntField sets the "int_field" field.
func (teu *TestEntUpdate) SetJSONField(jj *jsonfields.TestJSON) *TestEntUpdate
SetJSONField sets the "json_field" field.
func (teu *TestEntUpdate) SetNillableBoolField(b *bool) *TestEntUpdate
SetNillableBoolField sets the "bool_field" field if the given value is not nil.
func (teu *TestEntUpdate) SetNillableEnumField(ee *enums.TestEnum) *TestEntUpdate
SetNillableEnumField sets the "enum_field" field if the given value is not nil.
func (teu *TestEntUpdate) SetNillableFloatField(f *float64) *TestEntUpdate
SetNillableFloatField sets the "float_field" field if the given value is not nil.
func (teu *TestEntUpdate) SetNillableInt64Field(i *int64) *TestEntUpdate
SetNillableInt64Field sets the "int64_field" field if the given value is not nil.
func (teu *TestEntUpdate) SetNillableIntField(i *int) *TestEntUpdate
SetNillableIntField sets the "int_field" field if the given value is not nil.
func (teu *TestEntUpdate) SetNillableStringField(s *string) *TestEntUpdate
SetNillableStringField sets the "string_field" field if the given value is not nil.
func (teu *TestEntUpdate) SetNillableTextField(s *string) *TestEntUpdate
SetNillableTextField sets the "text_field" field if the given value is not nil.
func (teu *TestEntUpdate) SetNillableTimeField(t *time.Time) *TestEntUpdate
SetNillableTimeField sets the "time_field" field if the given value is not nil.
func (teu *TestEntUpdate) SetStringField(s string) *TestEntUpdate
SetStringField sets the "string_field" field.
func (teu *TestEntUpdate) SetTextField(s string) *TestEntUpdate
SetTextField sets the "text_field" field.
func (teu *TestEntUpdate) SetTimeField(t time.Time) *TestEntUpdate
SetTimeField sets the "time_field" field.
func (teu *TestEntUpdate) Where(ps ...predicate.TestEnt) *TestEntUpdate
Where appends a list predicates to the TestEntUpdate builder.
TestEntUpdateOne is the builder for updating a single TestEnt entity.
type TestEntUpdateOne struct {
// contains filtered or unexported fields
}
func (teuo *TestEntUpdateOne) AddFloatField(f float64) *TestEntUpdateOne
AddFloatField adds f to the "float_field" field.
func (teuo *TestEntUpdateOne) AddInt64Field(i int64) *TestEntUpdateOne
AddInt64Field adds i to the "int64_field" field.
func (teuo *TestEntUpdateOne) AddIntField(i int) *TestEntUpdateOne
AddIntField adds i to the "int_field" field.
func (teuo *TestEntUpdateOne) ClearBoolField() *TestEntUpdateOne
ClearBoolField clears the value of the "bool_field" field.
func (teuo *TestEntUpdateOne) ClearBytesField() *TestEntUpdateOne
ClearBytesField clears the value of the "bytes_field" field.
func (teuo *TestEntUpdateOne) ClearEnumField() *TestEntUpdateOne
ClearEnumField clears the value of the "enum_field" field.
func (teuo *TestEntUpdateOne) ClearFloatField() *TestEntUpdateOne
ClearFloatField clears the value of the "float_field" field.
func (teuo *TestEntUpdateOne) ClearInt64Field() *TestEntUpdateOne
ClearInt64Field clears the value of the "int64_field" field.
func (teuo *TestEntUpdateOne) ClearIntField() *TestEntUpdateOne
ClearIntField clears the value of the "int_field" field.
func (teuo *TestEntUpdateOne) ClearJSONField() *TestEntUpdateOne
ClearJSONField clears the value of the "json_field" field.
func (teuo *TestEntUpdateOne) ClearStringField() *TestEntUpdateOne
ClearStringField clears the value of the "string_field" field.
func (teuo *TestEntUpdateOne) ClearTextField() *TestEntUpdateOne
ClearTextField clears the value of the "text_field" field.
func (teuo *TestEntUpdateOne) ClearTimeField() *TestEntUpdateOne
ClearTimeField clears the value of the "time_field" field.
func (teuo *TestEntUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (teuo *TestEntUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (teuo *TestEntUpdateOne) Mutation() *TestEntMutation
Mutation returns the TestEntMutation object of the builder.
func (teuo *TestEntUpdateOne) Save(ctx context.Context) (*TestEnt, error)
Save executes the query and returns the updated TestEnt entity.
func (teuo *TestEntUpdateOne) SaveX(ctx context.Context) *TestEnt
SaveX is like Save, but panics if an error occurs.
func (teuo *TestEntUpdateOne) Select(field string, fields ...string) *TestEntUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (teuo *TestEntUpdateOne) SetBoolField(b bool) *TestEntUpdateOne
SetBoolField sets the "bool_field" field.
func (teuo *TestEntUpdateOne) SetBytesField(b []byte) *TestEntUpdateOne
SetBytesField sets the "bytes_field" field.
func (teuo *TestEntUpdateOne) SetEnumField(ee enums.TestEnum) *TestEntUpdateOne
SetEnumField sets the "enum_field" field.
func (teuo *TestEntUpdateOne) SetFloatField(f float64) *TestEntUpdateOne
SetFloatField sets the "float_field" field.
func (teuo *TestEntUpdateOne) SetInt64Field(i int64) *TestEntUpdateOne
SetInt64Field sets the "int64_field" field.
func (teuo *TestEntUpdateOne) SetIntField(i int) *TestEntUpdateOne
SetIntField sets the "int_field" field.
func (teuo *TestEntUpdateOne) SetJSONField(jj *jsonfields.TestJSON) *TestEntUpdateOne
SetJSONField sets the "json_field" field.
func (teuo *TestEntUpdateOne) SetNillableBoolField(b *bool) *TestEntUpdateOne
SetNillableBoolField sets the "bool_field" field if the given value is not nil.
func (teuo *TestEntUpdateOne) SetNillableEnumField(ee *enums.TestEnum) *TestEntUpdateOne
SetNillableEnumField sets the "enum_field" field if the given value is not nil.
func (teuo *TestEntUpdateOne) SetNillableFloatField(f *float64) *TestEntUpdateOne
SetNillableFloatField sets the "float_field" field if the given value is not nil.
func (teuo *TestEntUpdateOne) SetNillableInt64Field(i *int64) *TestEntUpdateOne
SetNillableInt64Field sets the "int64_field" field if the given value is not nil.
func (teuo *TestEntUpdateOne) SetNillableIntField(i *int) *TestEntUpdateOne
SetNillableIntField sets the "int_field" field if the given value is not nil.
func (teuo *TestEntUpdateOne) SetNillableStringField(s *string) *TestEntUpdateOne
SetNillableStringField sets the "string_field" field if the given value is not nil.
func (teuo *TestEntUpdateOne) SetNillableTextField(s *string) *TestEntUpdateOne
SetNillableTextField sets the "text_field" field if the given value is not nil.
func (teuo *TestEntUpdateOne) SetNillableTimeField(t *time.Time) *TestEntUpdateOne
SetNillableTimeField sets the "time_field" field if the given value is not nil.
func (teuo *TestEntUpdateOne) SetStringField(s string) *TestEntUpdateOne
SetStringField sets the "string_field" field.
func (teuo *TestEntUpdateOne) SetTextField(s string) *TestEntUpdateOne
SetTextField sets the "text_field" field.
func (teuo *TestEntUpdateOne) SetTimeField(t time.Time) *TestEntUpdateOne
SetTimeField sets the "time_field" field.
func (teuo *TestEntUpdateOne) Where(ps ...predicate.TestEnt) *TestEntUpdateOne
Where appends a list predicates to the TestEntUpdate builder.
TestEntUpsert is the "OnConflict" setter.
type TestEntUpsert struct {
*sql.UpdateSet
}
func (u *TestEntUpsert) AddFloatField(v float64) *TestEntUpsert
AddFloatField adds v to the "float_field" field.
func (u *TestEntUpsert) AddInt64Field(v int64) *TestEntUpsert
AddInt64Field adds v to the "int64_field" field.
func (u *TestEntUpsert) AddIntField(v int) *TestEntUpsert
AddIntField adds v to the "int_field" field.
func (u *TestEntUpsert) ClearBoolField() *TestEntUpsert
ClearBoolField clears the value of the "bool_field" field.
func (u *TestEntUpsert) ClearBytesField() *TestEntUpsert
ClearBytesField clears the value of the "bytes_field" field.
func (u *TestEntUpsert) ClearEnumField() *TestEntUpsert
ClearEnumField clears the value of the "enum_field" field.
func (u *TestEntUpsert) ClearFloatField() *TestEntUpsert
ClearFloatField clears the value of the "float_field" field.
func (u *TestEntUpsert) ClearInt64Field() *TestEntUpsert
ClearInt64Field clears the value of the "int64_field" field.
func (u *TestEntUpsert) ClearIntField() *TestEntUpsert
ClearIntField clears the value of the "int_field" field.
func (u *TestEntUpsert) ClearJSONField() *TestEntUpsert
ClearJSONField clears the value of the "json_field" field.
func (u *TestEntUpsert) ClearStringField() *TestEntUpsert
ClearStringField clears the value of the "string_field" field.
func (u *TestEntUpsert) ClearTextField() *TestEntUpsert
ClearTextField clears the value of the "text_field" field.
func (u *TestEntUpsert) ClearTimeField() *TestEntUpsert
ClearTimeField clears the value of the "time_field" field.
func (u *TestEntUpsert) SetBoolField(v bool) *TestEntUpsert
SetBoolField sets the "bool_field" field.
func (u *TestEntUpsert) SetBytesField(v []byte) *TestEntUpsert
SetBytesField sets the "bytes_field" field.
func (u *TestEntUpsert) SetEnumField(v enums.TestEnum) *TestEntUpsert
SetEnumField sets the "enum_field" field.
func (u *TestEntUpsert) SetFloatField(v float64) *TestEntUpsert
SetFloatField sets the "float_field" field.
func (u *TestEntUpsert) SetInt64Field(v int64) *TestEntUpsert
SetInt64Field sets the "int64_field" field.
func (u *TestEntUpsert) SetIntField(v int) *TestEntUpsert
SetIntField sets the "int_field" field.
func (u *TestEntUpsert) SetJSONField(v *jsonfields.TestJSON) *TestEntUpsert
SetJSONField sets the "json_field" field.
func (u *TestEntUpsert) SetStringField(v string) *TestEntUpsert
SetStringField sets the "string_field" field.
func (u *TestEntUpsert) SetTextField(v string) *TestEntUpsert
SetTextField sets the "text_field" field.
func (u *TestEntUpsert) SetTimeField(v time.Time) *TestEntUpsert
SetTimeField sets the "time_field" field.
func (u *TestEntUpsert) UpdateBoolField() *TestEntUpsert
UpdateBoolField sets the "bool_field" field to the value that was provided on create.
func (u *TestEntUpsert) UpdateBytesField() *TestEntUpsert
UpdateBytesField sets the "bytes_field" field to the value that was provided on create.
func (u *TestEntUpsert) UpdateEnumField() *TestEntUpsert
UpdateEnumField sets the "enum_field" field to the value that was provided on create.
func (u *TestEntUpsert) UpdateFloatField() *TestEntUpsert
UpdateFloatField sets the "float_field" field to the value that was provided on create.
func (u *TestEntUpsert) UpdateInt64Field() *TestEntUpsert
UpdateInt64Field sets the "int64_field" field to the value that was provided on create.
func (u *TestEntUpsert) UpdateIntField() *TestEntUpsert
UpdateIntField sets the "int_field" field to the value that was provided on create.
func (u *TestEntUpsert) UpdateJSONField() *TestEntUpsert
UpdateJSONField sets the "json_field" field to the value that was provided on create.
func (u *TestEntUpsert) UpdateStringField() *TestEntUpsert
UpdateStringField sets the "string_field" field to the value that was provided on create.
func (u *TestEntUpsert) UpdateTextField() *TestEntUpsert
UpdateTextField sets the "text_field" field to the value that was provided on create.
func (u *TestEntUpsert) UpdateTimeField() *TestEntUpsert
UpdateTimeField sets the "time_field" field to the value that was provided on create.
TestEntUpsertBulk is the builder for "upsert"-ing a bulk of TestEnt nodes.
type TestEntUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *TestEntUpsertBulk) AddFloatField(v float64) *TestEntUpsertBulk
AddFloatField adds v to the "float_field" field.
func (u *TestEntUpsertBulk) AddInt64Field(v int64) *TestEntUpsertBulk
AddInt64Field adds v to the "int64_field" field.
func (u *TestEntUpsertBulk) AddIntField(v int) *TestEntUpsertBulk
AddIntField adds v to the "int_field" field.
func (u *TestEntUpsertBulk) ClearBoolField() *TestEntUpsertBulk
ClearBoolField clears the value of the "bool_field" field.
func (u *TestEntUpsertBulk) ClearBytesField() *TestEntUpsertBulk
ClearBytesField clears the value of the "bytes_field" field.
func (u *TestEntUpsertBulk) ClearEnumField() *TestEntUpsertBulk
ClearEnumField clears the value of the "enum_field" field.
func (u *TestEntUpsertBulk) ClearFloatField() *TestEntUpsertBulk
ClearFloatField clears the value of the "float_field" field.
func (u *TestEntUpsertBulk) ClearInt64Field() *TestEntUpsertBulk
ClearInt64Field clears the value of the "int64_field" field.
func (u *TestEntUpsertBulk) ClearIntField() *TestEntUpsertBulk
ClearIntField clears the value of the "int_field" field.
func (u *TestEntUpsertBulk) ClearJSONField() *TestEntUpsertBulk
ClearJSONField clears the value of the "json_field" field.
func (u *TestEntUpsertBulk) ClearStringField() *TestEntUpsertBulk
ClearStringField clears the value of the "string_field" field.
func (u *TestEntUpsertBulk) ClearTextField() *TestEntUpsertBulk
ClearTextField clears the value of the "text_field" field.
func (u *TestEntUpsertBulk) ClearTimeField() *TestEntUpsertBulk
ClearTimeField clears the value of the "time_field" field.
func (u *TestEntUpsertBulk) DoNothing() *TestEntUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *TestEntUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *TestEntUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *TestEntUpsertBulk) Ignore() *TestEntUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.TestEnt.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *TestEntUpsertBulk) SetBoolField(v bool) *TestEntUpsertBulk
SetBoolField sets the "bool_field" field.
func (u *TestEntUpsertBulk) SetBytesField(v []byte) *TestEntUpsertBulk
SetBytesField sets the "bytes_field" field.
func (u *TestEntUpsertBulk) SetEnumField(v enums.TestEnum) *TestEntUpsertBulk
SetEnumField sets the "enum_field" field.
func (u *TestEntUpsertBulk) SetFloatField(v float64) *TestEntUpsertBulk
SetFloatField sets the "float_field" field.
func (u *TestEntUpsertBulk) SetInt64Field(v int64) *TestEntUpsertBulk
SetInt64Field sets the "int64_field" field.
func (u *TestEntUpsertBulk) SetIntField(v int) *TestEntUpsertBulk
SetIntField sets the "int_field" field.
func (u *TestEntUpsertBulk) SetJSONField(v *jsonfields.TestJSON) *TestEntUpsertBulk
SetJSONField sets the "json_field" field.
func (u *TestEntUpsertBulk) SetStringField(v string) *TestEntUpsertBulk
SetStringField sets the "string_field" field.
func (u *TestEntUpsertBulk) SetTextField(v string) *TestEntUpsertBulk
SetTextField sets the "text_field" field.
func (u *TestEntUpsertBulk) SetTimeField(v time.Time) *TestEntUpsertBulk
SetTimeField sets the "time_field" field.
func (u *TestEntUpsertBulk) Update(set func(*TestEntUpsert)) *TestEntUpsertBulk
Update allows overriding fields `UPDATE` values. See the TestEntCreateBulk.OnConflict documentation for more info.
func (u *TestEntUpsertBulk) UpdateBoolField() *TestEntUpsertBulk
UpdateBoolField sets the "bool_field" field to the value that was provided on create.
func (u *TestEntUpsertBulk) UpdateBytesField() *TestEntUpsertBulk
UpdateBytesField sets the "bytes_field" field to the value that was provided on create.
func (u *TestEntUpsertBulk) UpdateEnumField() *TestEntUpsertBulk
UpdateEnumField sets the "enum_field" field to the value that was provided on create.
func (u *TestEntUpsertBulk) UpdateFloatField() *TestEntUpsertBulk
UpdateFloatField sets the "float_field" field to the value that was provided on create.
func (u *TestEntUpsertBulk) UpdateInt64Field() *TestEntUpsertBulk
UpdateInt64Field sets the "int64_field" field to the value that was provided on create.
func (u *TestEntUpsertBulk) UpdateIntField() *TestEntUpsertBulk
UpdateIntField sets the "int_field" field to the value that was provided on create.
func (u *TestEntUpsertBulk) UpdateJSONField() *TestEntUpsertBulk
UpdateJSONField sets the "json_field" field to the value that was provided on create.
func (u *TestEntUpsertBulk) UpdateNewValues() *TestEntUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.TestEnt.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *TestEntUpsertBulk) UpdateStringField() *TestEntUpsertBulk
UpdateStringField sets the "string_field" field to the value that was provided on create.
func (u *TestEntUpsertBulk) UpdateTextField() *TestEntUpsertBulk
UpdateTextField sets the "text_field" field to the value that was provided on create.
func (u *TestEntUpsertBulk) UpdateTimeField() *TestEntUpsertBulk
UpdateTimeField sets the "time_field" field to the value that was provided on create.
TestEntUpsertOne is the builder for "upsert"-ing
one TestEnt node.
type TestEntUpsertOne struct {
// contains filtered or unexported fields
}
func (u *TestEntUpsertOne) AddFloatField(v float64) *TestEntUpsertOne
AddFloatField adds v to the "float_field" field.
func (u *TestEntUpsertOne) AddInt64Field(v int64) *TestEntUpsertOne
AddInt64Field adds v to the "int64_field" field.
func (u *TestEntUpsertOne) AddIntField(v int) *TestEntUpsertOne
AddIntField adds v to the "int_field" field.
func (u *TestEntUpsertOne) ClearBoolField() *TestEntUpsertOne
ClearBoolField clears the value of the "bool_field" field.
func (u *TestEntUpsertOne) ClearBytesField() *TestEntUpsertOne
ClearBytesField clears the value of the "bytes_field" field.
func (u *TestEntUpsertOne) ClearEnumField() *TestEntUpsertOne
ClearEnumField clears the value of the "enum_field" field.
func (u *TestEntUpsertOne) ClearFloatField() *TestEntUpsertOne
ClearFloatField clears the value of the "float_field" field.
func (u *TestEntUpsertOne) ClearInt64Field() *TestEntUpsertOne
ClearInt64Field clears the value of the "int64_field" field.
func (u *TestEntUpsertOne) ClearIntField() *TestEntUpsertOne
ClearIntField clears the value of the "int_field" field.
func (u *TestEntUpsertOne) ClearJSONField() *TestEntUpsertOne
ClearJSONField clears the value of the "json_field" field.
func (u *TestEntUpsertOne) ClearStringField() *TestEntUpsertOne
ClearStringField clears the value of the "string_field" field.
func (u *TestEntUpsertOne) ClearTextField() *TestEntUpsertOne
ClearTextField clears the value of the "text_field" field.
func (u *TestEntUpsertOne) ClearTimeField() *TestEntUpsertOne
ClearTimeField clears the value of the "time_field" field.
func (u *TestEntUpsertOne) DoNothing() *TestEntUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *TestEntUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *TestEntUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *TestEntUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *TestEntUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *TestEntUpsertOne) Ignore() *TestEntUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.TestEnt.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *TestEntUpsertOne) SetBoolField(v bool) *TestEntUpsertOne
SetBoolField sets the "bool_field" field.
func (u *TestEntUpsertOne) SetBytesField(v []byte) *TestEntUpsertOne
SetBytesField sets the "bytes_field" field.
func (u *TestEntUpsertOne) SetEnumField(v enums.TestEnum) *TestEntUpsertOne
SetEnumField sets the "enum_field" field.
func (u *TestEntUpsertOne) SetFloatField(v float64) *TestEntUpsertOne
SetFloatField sets the "float_field" field.
func (u *TestEntUpsertOne) SetInt64Field(v int64) *TestEntUpsertOne
SetInt64Field sets the "int64_field" field.
func (u *TestEntUpsertOne) SetIntField(v int) *TestEntUpsertOne
SetIntField sets the "int_field" field.
func (u *TestEntUpsertOne) SetJSONField(v *jsonfields.TestJSON) *TestEntUpsertOne
SetJSONField sets the "json_field" field.
func (u *TestEntUpsertOne) SetStringField(v string) *TestEntUpsertOne
SetStringField sets the "string_field" field.
func (u *TestEntUpsertOne) SetTextField(v string) *TestEntUpsertOne
SetTextField sets the "text_field" field.
func (u *TestEntUpsertOne) SetTimeField(v time.Time) *TestEntUpsertOne
SetTimeField sets the "time_field" field.
func (u *TestEntUpsertOne) Update(set func(*TestEntUpsert)) *TestEntUpsertOne
Update allows overriding fields `UPDATE` values. See the TestEntCreate.OnConflict documentation for more info.
func (u *TestEntUpsertOne) UpdateBoolField() *TestEntUpsertOne
UpdateBoolField sets the "bool_field" field to the value that was provided on create.
func (u *TestEntUpsertOne) UpdateBytesField() *TestEntUpsertOne
UpdateBytesField sets the "bytes_field" field to the value that was provided on create.
func (u *TestEntUpsertOne) UpdateEnumField() *TestEntUpsertOne
UpdateEnumField sets the "enum_field" field to the value that was provided on create.
func (u *TestEntUpsertOne) UpdateFloatField() *TestEntUpsertOne
UpdateFloatField sets the "float_field" field to the value that was provided on create.
func (u *TestEntUpsertOne) UpdateInt64Field() *TestEntUpsertOne
UpdateInt64Field sets the "int64_field" field to the value that was provided on create.
func (u *TestEntUpsertOne) UpdateIntField() *TestEntUpsertOne
UpdateIntField sets the "int_field" field to the value that was provided on create.
func (u *TestEntUpsertOne) UpdateJSONField() *TestEntUpsertOne
UpdateJSONField sets the "json_field" field to the value that was provided on create.
func (u *TestEntUpsertOne) UpdateNewValues() *TestEntUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.TestEnt.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *TestEntUpsertOne) UpdateStringField() *TestEntUpsertOne
UpdateStringField sets the "string_field" field to the value that was provided on create.
func (u *TestEntUpsertOne) UpdateTextField() *TestEntUpsertOne
UpdateTextField sets the "text_field" field to the value that was provided on create.
func (u *TestEntUpsertOne) UpdateTimeField() *TestEntUpsertOne
UpdateTimeField sets the "time_field" field to the value that was provided on create.
TestEnts is a parsable slice of TestEnt.
type TestEnts []*TestEnt
ent aliases to avoid import conflicts in user's code.
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Traverser = ent.Traverser
Tx is a transactional client that is created by calling Client.Tx().
type Tx struct {
// Auth is the client for interacting with the Auth builders.
Auth *AuthClient
// HPAmebloPost is the client for interacting with the HPAmebloPost builders.
HPAmebloPost *HPAmebloPostClient
// HPArtist is the client for interacting with the HPArtist builders.
HPArtist *HPArtistClient
// HPAsset is the client for interacting with the HPAsset builders.
HPAsset *HPAssetClient
// HPBlob is the client for interacting with the HPBlob builders.
HPBlob *HPBlobClient
// HPElineupMallItem is the client for interacting with the HPElineupMallItem builders.
HPElineupMallItem *HPElineupMallItemClient
// HPEvent is the client for interacting with the HPEvent builders.
HPEvent *HPEventClient
// HPFCEventTicket is the client for interacting with the HPFCEventTicket builders.
HPFCEventTicket *HPFCEventTicketClient
// HPFeedItem is the client for interacting with the HPFeedItem builders.
HPFeedItem *HPFeedItemClient
// HPFollow is the client for interacting with the HPFollow builders.
HPFollow *HPFollowClient
// HPIgPost is the client for interacting with the HPIgPost builders.
HPIgPost *HPIgPostClient
// HPMember is the client for interacting with the HPMember builders.
HPMember *HPMemberClient
// HPSortHistory is the client for interacting with the HPSortHistory builders.
HPSortHistory *HPSortHistoryClient
// HPViewHistory is the client for interacting with the HPViewHistory builders.
HPViewHistory *HPViewHistoryClient
// TestEnt is the client for interacting with the TestEnt builders.
TestEnt *TestEntClient
// User is the client for interacting with the User builders.
User *UserClient
// UserNotificationLog is the client for interacting with the UserNotificationLog builders.
UserNotificationLog *UserNotificationLogClient
// UserNotificationSetting is the client for interacting with the UserNotificationSetting builders.
UserNotificationSetting *UserNotificationSettingClient
// contains filtered or unexported fields
}
func TxFromContext(ctx context.Context) *Tx
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (tx *Tx) Client() *Client
Client returns a Client that binds to current transaction.
func (tx *Tx) Commit() error
Commit commits the transaction.
func (tx *Tx) OnCommit(f CommitHook)
OnCommit adds a hook to call on commit.
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
func (tx *Tx) Rollback() error
Rollback rollbacks the transaction.
User is the model entity for the User schema.
type User struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// unique identifier with [a-z0-9][a-z0-9_.]+
Username string `json:"username,omitempty"`
// access token for the first party clients to access
AccessToken string `json:"access_token,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the UserQuery when eager-loading is set.
Edges UserEdges `json:"edges"`
// contains filtered or unexported fields
}
func (u *User) Auth(ctx context.Context) (result []*Auth, err error)
func (u *User) HpfcEventTickets(ctx context.Context) (result []*HPFCEventTicket, err error)
func (u *User) HpmemberFollowing(ctx context.Context) (result []*HPFollow, err error)
func (u *User) HpsortHistory(ctx context.Context) (result []*HPSortHistory, err error)
func (u *User) HpviewHistory(ctx context.Context) (result []*HPViewHistory, err error)
func (n *User) IsNode()
IsNode implements the Node interface check for GQLGen.
func (u *User) NamedAuth(name string) ([]*Auth, error)
NamedAuth returns the Auth named value or an error if the edge was not loaded in eager-loading with this name.
func (u *User) NamedHpfcEventTickets(name string) ([]*HPFCEventTicket, error)
NamedHpfcEventTickets returns the HpfcEventTickets named value or an error if the edge was not loaded in eager-loading with this name.
func (u *User) NamedHpmemberFollowing(name string) ([]*HPFollow, error)
NamedHpmemberFollowing returns the HpmemberFollowing named value or an error if the edge was not loaded in eager-loading with this name.
func (u *User) NamedHpsortHistory(name string) ([]*HPSortHistory, error)
NamedHpsortHistory returns the HpsortHistory named value or an error if the edge was not loaded in eager-loading with this name.
func (u *User) NamedHpviewHistory(name string) ([]*HPViewHistory, error)
NamedHpviewHistory returns the HpviewHistory named value or an error if the edge was not loaded in eager-loading with this name.
func (u *User) NamedNotificationSettings(name string) ([]*UserNotificationSetting, error)
NamedNotificationSettings returns the NotificationSettings named value or an error if the edge was not loaded in eager-loading with this name.
func (u *User) NotificationSettings(ctx context.Context) (result []*UserNotificationSetting, err error)
func (u *User) QueryAuth() *AuthQuery
QueryAuth queries the "auth" edge of the User entity.
func (u *User) QueryHpfcEventTickets() *HPFCEventTicketQuery
QueryHpfcEventTickets queries the "hpfc_event_tickets" edge of the User entity.
func (u *User) QueryHpmemberFollowing() *HPFollowQuery
QueryHpmemberFollowing queries the "hpmember_following" edge of the User entity.
func (u *User) QueryHpsortHistory() *HPSortHistoryQuery
QueryHpsortHistory queries the "hpsort_history" edge of the User entity.
func (u *User) QueryHpviewHistory() *HPViewHistoryQuery
QueryHpviewHistory queries the "hpview_history" edge of the User entity.
func (u *User) QueryNotificationSettings() *UserNotificationSettingQuery
QueryNotificationSettings queries the "notification_settings" edge of the User entity.
func (u *User) String() string
String implements the fmt.Stringer.
func (u *User) ToEdge(order *UserOrder) *UserEdge
ToEdge converts User into UserEdge.
func (u *User) Unwrap() *User
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
func (u *User) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the User. This includes values selected through modifiers, order, etc.
UserClient is a client for the User schema.
type UserClient struct {
// contains filtered or unexported fields
}
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
Get returns a User entity by its id.
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (c *UserClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (c *UserClient) QueryAuth(u *User) *AuthQuery
QueryAuth queries the auth edge of a User.
func (c *UserClient) QueryHpfcEventTickets(u *User) *HPFCEventTicketQuery
QueryHpfcEventTickets queries the hpfc_event_tickets edge of a User.
func (c *UserClient) QueryHpmemberFollowing(u *User) *HPFollowQuery
QueryHpmemberFollowing queries the hpmember_following edge of a User.
func (c *UserClient) QueryHpsortHistory(u *User) *HPSortHistoryQuery
QueryHpsortHistory queries the hpsort_history edge of a User.
func (c *UserClient) QueryHpviewHistory(u *User) *HPViewHistoryQuery
QueryHpviewHistory queries the hpview_history edge of a User.
func (c *UserClient) QueryNotificationSettings(u *User) *UserNotificationSettingQuery
QueryNotificationSettings queries the notification_settings edge of a User.
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
UserConnection is the connection containing edges to User.
type UserConnection struct {
Edges []*UserEdge `json:"edges"`
PageInfo PageInfo `json:"pageInfo"`
TotalCount int `json:"totalCount"`
}
UserCreate is the builder for creating a User entity.
type UserCreate struct {
// contains filtered or unexported fields
}
func (uc *UserCreate) AddAuth(a ...*Auth) *UserCreate
AddAuth adds the "auth" edges to the Auth entity.
func (uc *UserCreate) AddAuthIDs(ids ...int) *UserCreate
AddAuthIDs adds the "auth" edge to the Auth entity by IDs.
func (uc *UserCreate) AddHpfcEventTicketIDs(ids ...int) *UserCreate
AddHpfcEventTicketIDs adds the "hpfc_event_tickets" edge to the HPFCEventTicket entity by IDs.
func (uc *UserCreate) AddHpfcEventTickets(h ...*HPFCEventTicket) *UserCreate
AddHpfcEventTickets adds the "hpfc_event_tickets" edges to the HPFCEventTicket entity.
func (uc *UserCreate) AddHpmemberFollowing(h ...*HPFollow) *UserCreate
AddHpmemberFollowing adds the "hpmember_following" edges to the HPFollow entity.
func (uc *UserCreate) AddHpmemberFollowingIDs(ids ...int) *UserCreate
AddHpmemberFollowingIDs adds the "hpmember_following" edge to the HPFollow entity by IDs.
func (uc *UserCreate) AddHpsortHistory(h ...*HPSortHistory) *UserCreate
AddHpsortHistory adds the "hpsort_history" edges to the HPSortHistory entity.
func (uc *UserCreate) AddHpsortHistoryIDs(ids ...int) *UserCreate
AddHpsortHistoryIDs adds the "hpsort_history" edge to the HPSortHistory entity by IDs.
func (uc *UserCreate) AddHpviewHistory(h ...*HPViewHistory) *UserCreate
AddHpviewHistory adds the "hpview_history" edges to the HPViewHistory entity.
func (uc *UserCreate) AddHpviewHistoryIDs(ids ...int) *UserCreate
AddHpviewHistoryIDs adds the "hpview_history" edge to the HPViewHistory entity by IDs.
func (uc *UserCreate) AddNotificationSettingIDs(ids ...int) *UserCreate
AddNotificationSettingIDs adds the "notification_settings" edge to the UserNotificationSetting entity by IDs.
func (uc *UserCreate) AddNotificationSettings(u ...*UserNotificationSetting) *UserCreate
AddNotificationSettings adds the "notification_settings" edges to the UserNotificationSetting entity.
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.UserUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (uc *UserCreate) SetAccessToken(s string) *UserCreate
SetAccessToken sets the "access_token" field.
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" field.
func (uc *UserCreate) SetUsername(s string) *UserCreate
SetUsername sets the "username" field.
UserCreateBulk is the builder for creating many User entities in bulk.
type UserCreateBulk struct {
// contains filtered or unexported fields
}
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.UserUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)
Save creates the User entities in the database.
func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User
SaveX is like Save, but panics if an error occurs.
UserDelete is the builder for deleting a User entity.
type UserDelete struct {
// contains filtered or unexported fields
}
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
UserDeleteOne is the builder for deleting a single User entity.
type UserDeleteOne struct {
// contains filtered or unexported fields
}
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
UserEdge is the edge representation of User.
type UserEdge struct {
Node *User `json:"node"`
Cursor Cursor `json:"cursor"`
}
UserEdges holds the relations/edges for other nodes in the graph.
type UserEdges struct {
// Auth holds the value of the auth edge.
Auth []*Auth `json:"auth,omitempty"`
// NotificationSettings holds the value of the notification_settings edge.
NotificationSettings []*UserNotificationSetting `json:"notification_settings,omitempty"`
// HpviewHistory holds the value of the hpview_history edge.
HpviewHistory []*HPViewHistory `json:"hpview_history,omitempty"`
// HpmemberFollowing holds the value of the hpmember_following edge.
HpmemberFollowing []*HPFollow `json:"hpmember_following,omitempty"`
// HpsortHistory holds the value of the hpsort_history edge.
HpsortHistory []*HPSortHistory `json:"hpsort_history,omitempty"`
// HpfcEventTickets holds the value of the hpfc_event_tickets edge.
HpfcEventTickets []*HPFCEventTicket `json:"hpfc_event_tickets,omitempty"`
// contains filtered or unexported fields
}
func (e UserEdges) AuthOrErr() ([]*Auth, error)
AuthOrErr returns the Auth value or an error if the edge was not loaded in eager-loading.
func (e UserEdges) HpfcEventTicketsOrErr() ([]*HPFCEventTicket, error)
HpfcEventTicketsOrErr returns the HpfcEventTickets value or an error if the edge was not loaded in eager-loading.
func (e UserEdges) HpmemberFollowingOrErr() ([]*HPFollow, error)
HpmemberFollowingOrErr returns the HpmemberFollowing value or an error if the edge was not loaded in eager-loading.
func (e UserEdges) HpsortHistoryOrErr() ([]*HPSortHistory, error)
HpsortHistoryOrErr returns the HpsortHistory value or an error if the edge was not loaded in eager-loading.
func (e UserEdges) HpviewHistoryOrErr() ([]*HPViewHistory, error)
HpviewHistoryOrErr returns the HpviewHistory value or an error if the edge was not loaded in eager-loading.
func (e UserEdges) NotificationSettingsOrErr() ([]*UserNotificationSetting, error)
NotificationSettingsOrErr returns the NotificationSettings value or an error if the edge was not loaded in eager-loading.
UserFilter provides a generic filtering capability at runtime for UserQuery.
type UserFilter struct {
// contains filtered or unexported fields
}
func (f *UserFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *UserFilter) WhereAccessToken(p entql.StringP)
WhereAccessToken applies the entql string predicate on the access_token field.
func (f *UserFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (f *UserFilter) WhereHasAuth()
WhereHasAuth applies a predicate to check if query has an edge auth.
func (f *UserFilter) WhereHasAuthWith(preds ...predicate.Auth)
WhereHasAuthWith applies a predicate to check if query has an edge auth with a given conditions (other predicates).
func (f *UserFilter) WhereHasHpfcEventTickets()
WhereHasHpfcEventTickets applies a predicate to check if query has an edge hpfc_event_tickets.
func (f *UserFilter) WhereHasHpfcEventTicketsWith(preds ...predicate.HPFCEventTicket)
WhereHasHpfcEventTicketsWith applies a predicate to check if query has an edge hpfc_event_tickets with a given conditions (other predicates).
func (f *UserFilter) WhereHasHpmemberFollowing()
WhereHasHpmemberFollowing applies a predicate to check if query has an edge hpmember_following.
func (f *UserFilter) WhereHasHpmemberFollowingWith(preds ...predicate.HPFollow)
WhereHasHpmemberFollowingWith applies a predicate to check if query has an edge hpmember_following with a given conditions (other predicates).
func (f *UserFilter) WhereHasHpsortHistory()
WhereHasHpsortHistory applies a predicate to check if query has an edge hpsort_history.
func (f *UserFilter) WhereHasHpsortHistoryWith(preds ...predicate.HPSortHistory)
WhereHasHpsortHistoryWith applies a predicate to check if query has an edge hpsort_history with a given conditions (other predicates).
func (f *UserFilter) WhereHasHpviewHistory()
WhereHasHpviewHistory applies a predicate to check if query has an edge hpview_history.
func (f *UserFilter) WhereHasHpviewHistoryWith(preds ...predicate.HPViewHistory)
WhereHasHpviewHistoryWith applies a predicate to check if query has an edge hpview_history with a given conditions (other predicates).
func (f *UserFilter) WhereHasNotificationSettings()
WhereHasNotificationSettings applies a predicate to check if query has an edge notification_settings.
func (f *UserFilter) WhereHasNotificationSettingsWith(preds ...predicate.UserNotificationSetting)
WhereHasNotificationSettingsWith applies a predicate to check if query has an edge notification_settings with a given conditions (other predicates).
func (f *UserFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *UserFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
func (f *UserFilter) WhereUsername(p entql.StringP)
WhereUsername applies the entql string predicate on the username field.
UserGroupBy is the group-by builder for User entities.
type UserGroupBy struct {
// contains filtered or unexported fields
}
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *UserGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *UserGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *UserGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *UserGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *UserGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *UserGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *UserGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
UserMutation represents an operation that mutates the User nodes in the graph.
type UserMutation struct {
// contains filtered or unexported fields
}
func (m *UserMutation) AccessToken() (r string, exists bool)
AccessToken returns the value of the "access_token" field in the mutation.
func (m *UserMutation) AddAuthIDs(ids ...int)
AddAuthIDs adds the "auth" edge to the Auth entity by ids.
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *UserMutation) AddHpfcEventTicketIDs(ids ...int)
AddHpfcEventTicketIDs adds the "hpfc_event_tickets" edge to the HPFCEventTicket entity by ids.
func (m *UserMutation) AddHpmemberFollowingIDs(ids ...int)
AddHpmemberFollowingIDs adds the "hpmember_following" edge to the HPFollow entity by ids.
func (m *UserMutation) AddHpsortHistoryIDs(ids ...int)
AddHpsortHistoryIDs adds the "hpsort_history" edge to the HPSortHistory entity by ids.
func (m *UserMutation) AddHpviewHistoryIDs(ids ...int)
AddHpviewHistoryIDs adds the "hpview_history" edge to the HPViewHistory entity by ids.
func (m *UserMutation) AddNotificationSettingIDs(ids ...int)
AddNotificationSettingIDs adds the "notification_settings" edge to the UserNotificationSetting entity by ids.
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *UserMutation) AuthCleared() bool
AuthCleared reports if the "auth" edge to the Auth entity was cleared.
func (m *UserMutation) AuthIDs() (ids []int)
AuthIDs returns the "auth" edge IDs in the mutation.
func (m *UserMutation) ClearAuth()
ClearAuth clears the "auth" edge to the Auth entity.
func (m *UserMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *UserMutation) ClearHpfcEventTickets()
ClearHpfcEventTickets clears the "hpfc_event_tickets" edge to the HPFCEventTicket entity.
func (m *UserMutation) ClearHpmemberFollowing()
ClearHpmemberFollowing clears the "hpmember_following" edge to the HPFollow entity.
func (m *UserMutation) ClearHpsortHistory()
ClearHpsortHistory clears the "hpsort_history" edge to the HPSortHistory entity.
func (m *UserMutation) ClearHpviewHistory()
ClearHpviewHistory clears the "hpview_history" edge to the HPViewHistory entity.
func (m *UserMutation) ClearNotificationSettings()
ClearNotificationSettings clears the "notification_settings" edge to the UserNotificationSetting entity.
func (m *UserMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (m *UserMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *UserMutation) Filter() *UserFilter
Filter returns an entql.Where implementation to apply filters on the UserMutation builder.
func (m *UserMutation) HpfcEventTicketsCleared() bool
HpfcEventTicketsCleared reports if the "hpfc_event_tickets" edge to the HPFCEventTicket entity was cleared.
func (m *UserMutation) HpfcEventTicketsIDs() (ids []int)
HpfcEventTicketsIDs returns the "hpfc_event_tickets" edge IDs in the mutation.
func (m *UserMutation) HpmemberFollowingCleared() bool
HpmemberFollowingCleared reports if the "hpmember_following" edge to the HPFollow entity was cleared.
func (m *UserMutation) HpmemberFollowingIDs() (ids []int)
HpmemberFollowingIDs returns the "hpmember_following" edge IDs in the mutation.
func (m *UserMutation) HpsortHistoryCleared() bool
HpsortHistoryCleared reports if the "hpsort_history" edge to the HPSortHistory entity was cleared.
func (m *UserMutation) HpsortHistoryIDs() (ids []int)
HpsortHistoryIDs returns the "hpsort_history" edge IDs in the mutation.
func (m *UserMutation) HpviewHistoryCleared() bool
HpviewHistoryCleared reports if the "hpview_history" edge to the HPViewHistory entity was cleared.
func (m *UserMutation) HpviewHistoryIDs() (ids []int)
HpviewHistoryIDs returns the "hpview_history" edge IDs in the mutation.
func (m *UserMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *UserMutation) NotificationSettingsCleared() bool
NotificationSettingsCleared reports if the "notification_settings" edge to the UserNotificationSetting entity was cleared.
func (m *UserMutation) NotificationSettingsIDs() (ids []int)
NotificationSettingsIDs returns the "notification_settings" edge IDs in the mutation.
func (m *UserMutation) OldAccessToken(ctx context.Context) (v string, err error)
OldAccessToken returns the old "access_token" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserMutation) Op() Op
Op returns the operation name.
func (m *UserMutation) RemoveAuthIDs(ids ...int)
RemoveAuthIDs removes the "auth" edge to the Auth entity by IDs.
func (m *UserMutation) RemoveHpfcEventTicketIDs(ids ...int)
RemoveHpfcEventTicketIDs removes the "hpfc_event_tickets" edge to the HPFCEventTicket entity by IDs.
func (m *UserMutation) RemoveHpmemberFollowingIDs(ids ...int)
RemoveHpmemberFollowingIDs removes the "hpmember_following" edge to the HPFollow entity by IDs.
func (m *UserMutation) RemoveHpsortHistoryIDs(ids ...int)
RemoveHpsortHistoryIDs removes the "hpsort_history" edge to the HPSortHistory entity by IDs.
func (m *UserMutation) RemoveHpviewHistoryIDs(ids ...int)
RemoveHpviewHistoryIDs removes the "hpview_history" edge to the HPViewHistory entity by IDs.
func (m *UserMutation) RemoveNotificationSettingIDs(ids ...int)
RemoveNotificationSettingIDs removes the "notification_settings" edge to the UserNotificationSetting entity by IDs.
func (m *UserMutation) RemovedAuthIDs() (ids []int)
RemovedAuth returns the removed IDs of the "auth" edge to the Auth entity.
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *UserMutation) RemovedHpfcEventTicketsIDs() (ids []int)
RemovedHpfcEventTickets returns the removed IDs of the "hpfc_event_tickets" edge to the HPFCEventTicket entity.
func (m *UserMutation) RemovedHpmemberFollowingIDs() (ids []int)
RemovedHpmemberFollowing returns the removed IDs of the "hpmember_following" edge to the HPFollow entity.
func (m *UserMutation) RemovedHpsortHistoryIDs() (ids []int)
RemovedHpsortHistory returns the removed IDs of the "hpsort_history" edge to the HPSortHistory entity.
func (m *UserMutation) RemovedHpviewHistoryIDs() (ids []int)
RemovedHpviewHistory returns the removed IDs of the "hpview_history" edge to the HPViewHistory entity.
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *UserMutation) RemovedNotificationSettingsIDs() (ids []int)
RemovedNotificationSettings returns the removed IDs of the "notification_settings" edge to the UserNotificationSetting entity.
func (m *UserMutation) ResetAccessToken()
ResetAccessToken resets all changes to the "access_token" field.
func (m *UserMutation) ResetAuth()
ResetAuth resets all changes to the "auth" edge.
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *UserMutation) ResetHpfcEventTickets()
ResetHpfcEventTickets resets all changes to the "hpfc_event_tickets" edge.
func (m *UserMutation) ResetHpmemberFollowing()
ResetHpmemberFollowing resets all changes to the "hpmember_following" edge.
func (m *UserMutation) ResetHpsortHistory()
ResetHpsortHistory resets all changes to the "hpsort_history" edge.
func (m *UserMutation) ResetHpviewHistory()
ResetHpviewHistory resets all changes to the "hpview_history" edge.
func (m *UserMutation) ResetNotificationSettings()
ResetNotificationSettings resets all changes to the "notification_settings" edge.
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (m *UserMutation) SetAccessToken(s string)
SetAccessToken sets the "access_token" field.
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (m *UserMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (m *UserMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
UserNotificationLog is the model entity for the UserNotificationLog schema.
type UserNotificationLog struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// unique key to identify the notification source
Key string `json:"key,omitempty"`
// ocurrence of the notification. the pair of the key and trigger has to be unique
Trigger string `json:"trigger,omitempty"`
// true if the notification is generated for the test
IsTest bool `json:"is_test,omitempty"`
// Message payload for client to handle the notification
ReactNavigationMessage jsonfields.ReactNavigationPush `json:"react_navigation_message,omitempty"`
// expected time for the notification to be sent
ExpectedDeliveryTime time.Time `json:"expected_delivery_time,omitempty"`
// Status holds the value of the "status" field.
Status enums.UserNotificationStatus `json:"status,omitempty"`
// error message if happens
StatusMessage string `json:"status_message,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the UserNotificationLogQuery when eager-loading is set.
Edges UserNotificationLogEdges `json:"edges"`
// contains filtered or unexported fields
}
func (unl *UserNotificationLog) NamedReceivers(name string) ([]*UserNotificationSetting, error)
NamedReceivers returns the Receivers named value or an error if the edge was not loaded in eager-loading with this name.
func (unl *UserNotificationLog) QueryReceivers() *UserNotificationSettingQuery
QueryReceivers queries the "receivers" edge of the UserNotificationLog entity.
func (unl *UserNotificationLog) String() string
String implements the fmt.Stringer.
func (unl *UserNotificationLog) Unwrap() *UserNotificationLog
Unwrap unwraps the UserNotificationLog entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (unl *UserNotificationLog) Update() *UserNotificationLogUpdateOne
Update returns a builder for updating this UserNotificationLog. Note that you need to call UserNotificationLog.Unwrap() before calling this method if this UserNotificationLog was returned from a transaction, and the transaction was committed or rolled back.
func (unl *UserNotificationLog) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the UserNotificationLog. This includes values selected through modifiers, order, etc.
UserNotificationLogClient is a client for the UserNotificationLog schema.
type UserNotificationLogClient struct {
// contains filtered or unexported fields
}
func NewUserNotificationLogClient(c config) *UserNotificationLogClient
NewUserNotificationLogClient returns a client for the UserNotificationLog from the given config.
func (c *UserNotificationLogClient) Create() *UserNotificationLogCreate
Create returns a builder for creating a UserNotificationLog entity.
func (c *UserNotificationLogClient) CreateBulk(builders ...*UserNotificationLogCreate) *UserNotificationLogCreateBulk
CreateBulk returns a builder for creating a bulk of UserNotificationLog entities.
func (c *UserNotificationLogClient) Delete() *UserNotificationLogDelete
Delete returns a delete builder for UserNotificationLog.
func (c *UserNotificationLogClient) DeleteOne(unl *UserNotificationLog) *UserNotificationLogDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *UserNotificationLogClient) DeleteOneID(id int) *UserNotificationLogDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *UserNotificationLogClient) Get(ctx context.Context, id int) (*UserNotificationLog, error)
Get returns a UserNotificationLog entity by its id.
func (c *UserNotificationLogClient) GetX(ctx context.Context, id int) *UserNotificationLog
GetX is like Get, but panics if an error occurs.
func (c *UserNotificationLogClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *UserNotificationLogClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `usernotificationlog.Intercept(f(g(h())))`.
func (c *UserNotificationLogClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *UserNotificationLogClient) Query() *UserNotificationLogQuery
Query returns a query builder for UserNotificationLog.
func (c *UserNotificationLogClient) QueryReceivers(unl *UserNotificationLog) *UserNotificationSettingQuery
QueryReceivers queries the receivers edge of a UserNotificationLog.
func (c *UserNotificationLogClient) Update() *UserNotificationLogUpdate
Update returns an update builder for UserNotificationLog.
func (c *UserNotificationLogClient) UpdateOne(unl *UserNotificationLog) *UserNotificationLogUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *UserNotificationLogClient) UpdateOneID(id int) *UserNotificationLogUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *UserNotificationLogClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usernotificationlog.Hooks(f(g(h())))`.
UserNotificationLogCreate is the builder for creating a UserNotificationLog entity.
type UserNotificationLogCreate struct {
// contains filtered or unexported fields
}
func (unlc *UserNotificationLogCreate) AddReceiverIDs(ids ...int) *UserNotificationLogCreate
AddReceiverIDs adds the "receivers" edge to the UserNotificationSetting entity by IDs.
func (unlc *UserNotificationLogCreate) AddReceivers(u ...*UserNotificationSetting) *UserNotificationLogCreate
AddReceivers adds the "receivers" edges to the UserNotificationSetting entity.
func (unlc *UserNotificationLogCreate) Exec(ctx context.Context) error
Exec executes the query.
func (unlc *UserNotificationLogCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (unlc *UserNotificationLogCreate) Mutation() *UserNotificationLogMutation
Mutation returns the UserNotificationLogMutation object of the builder.
func (unlc *UserNotificationLogCreate) OnConflict(opts ...sql.ConflictOption) *UserNotificationLogUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.UserNotificationLog.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.UserNotificationLogUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (unlc *UserNotificationLogCreate) OnConflictColumns(columns ...string) *UserNotificationLogUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.UserNotificationLog.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (unlc *UserNotificationLogCreate) Save(ctx context.Context) (*UserNotificationLog, error)
Save creates the UserNotificationLog in the database.
func (unlc *UserNotificationLogCreate) SaveX(ctx context.Context) *UserNotificationLog
SaveX calls Save and panics if Save returns an error.
func (unlc *UserNotificationLogCreate) SetCreatedAt(t time.Time) *UserNotificationLogCreate
SetCreatedAt sets the "created_at" field.
func (unlc *UserNotificationLogCreate) SetExpectedDeliveryTime(t time.Time) *UserNotificationLogCreate
SetExpectedDeliveryTime sets the "expected_delivery_time" field.
func (unlc *UserNotificationLogCreate) SetIsTest(b bool) *UserNotificationLogCreate
SetIsTest sets the "is_test" field.
func (unlc *UserNotificationLogCreate) SetKey(s string) *UserNotificationLogCreate
SetKey sets the "key" field.
func (unlc *UserNotificationLogCreate) SetNillableCreatedAt(t *time.Time) *UserNotificationLogCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (unlc *UserNotificationLogCreate) SetNillableStatus(ens *enums.UserNotificationStatus) *UserNotificationLogCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (unlc *UserNotificationLogCreate) SetNillableStatusMessage(s *string) *UserNotificationLogCreate
SetNillableStatusMessage sets the "status_message" field if the given value is not nil.
func (unlc *UserNotificationLogCreate) SetNillableUpdatedAt(t *time.Time) *UserNotificationLogCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (unlc *UserNotificationLogCreate) SetReactNavigationMessage(jnp jsonfields.ReactNavigationPush) *UserNotificationLogCreate
SetReactNavigationMessage sets the "react_navigation_message" field.
func (unlc *UserNotificationLogCreate) SetStatus(ens enums.UserNotificationStatus) *UserNotificationLogCreate
SetStatus sets the "status" field.
func (unlc *UserNotificationLogCreate) SetStatusMessage(s string) *UserNotificationLogCreate
SetStatusMessage sets the "status_message" field.
func (unlc *UserNotificationLogCreate) SetTrigger(s string) *UserNotificationLogCreate
SetTrigger sets the "trigger" field.
func (unlc *UserNotificationLogCreate) SetUpdatedAt(t time.Time) *UserNotificationLogCreate
SetUpdatedAt sets the "updated_at" field.
UserNotificationLogCreateBulk is the builder for creating many UserNotificationLog entities in bulk.
type UserNotificationLogCreateBulk struct {
// contains filtered or unexported fields
}
func (unlcb *UserNotificationLogCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (unlcb *UserNotificationLogCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (unlcb *UserNotificationLogCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserNotificationLogUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.UserNotificationLog.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.UserNotificationLogUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (unlcb *UserNotificationLogCreateBulk) OnConflictColumns(columns ...string) *UserNotificationLogUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.UserNotificationLog.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (unlcb *UserNotificationLogCreateBulk) Save(ctx context.Context) ([]*UserNotificationLog, error)
Save creates the UserNotificationLog entities in the database.
func (unlcb *UserNotificationLogCreateBulk) SaveX(ctx context.Context) []*UserNotificationLog
SaveX is like Save, but panics if an error occurs.
UserNotificationLogDelete is the builder for deleting a UserNotificationLog entity.
type UserNotificationLogDelete struct {
// contains filtered or unexported fields
}
func (unld *UserNotificationLogDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (unld *UserNotificationLogDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (unld *UserNotificationLogDelete) Where(ps ...predicate.UserNotificationLog) *UserNotificationLogDelete
Where appends a list predicates to the UserNotificationLogDelete builder.
UserNotificationLogDeleteOne is the builder for deleting a single UserNotificationLog entity.
type UserNotificationLogDeleteOne struct {
// contains filtered or unexported fields
}
func (unldo *UserNotificationLogDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (unldo *UserNotificationLogDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (unldo *UserNotificationLogDeleteOne) Where(ps ...predicate.UserNotificationLog) *UserNotificationLogDeleteOne
Where appends a list predicates to the UserNotificationLogDelete builder.
UserNotificationLogEdges holds the relations/edges for other nodes in the graph.
type UserNotificationLogEdges struct {
// Receivers holds the value of the receivers edge.
Receivers []*UserNotificationSetting `json:"receivers,omitempty"`
// contains filtered or unexported fields
}
func (e UserNotificationLogEdges) ReceiversOrErr() ([]*UserNotificationSetting, error)
ReceiversOrErr returns the Receivers value or an error if the edge was not loaded in eager-loading.
UserNotificationLogFilter provides a generic filtering capability at runtime for UserNotificationLogQuery.
type UserNotificationLogFilter struct {
// contains filtered or unexported fields
}
func (f *UserNotificationLogFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *UserNotificationLogFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (f *UserNotificationLogFilter) WhereExpectedDeliveryTime(p entql.TimeP)
WhereExpectedDeliveryTime applies the entql time.Time predicate on the expected_delivery_time field.
func (f *UserNotificationLogFilter) WhereHasReceivers()
WhereHasReceivers applies a predicate to check if query has an edge receivers.
func (f *UserNotificationLogFilter) WhereHasReceiversWith(preds ...predicate.UserNotificationSetting)
WhereHasReceiversWith applies a predicate to check if query has an edge receivers with a given conditions (other predicates).
func (f *UserNotificationLogFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *UserNotificationLogFilter) WhereIsTest(p entql.BoolP)
WhereIsTest applies the entql bool predicate on the is_test field.
func (f *UserNotificationLogFilter) WhereKey(p entql.StringP)
WhereKey applies the entql string predicate on the key field.
func (f *UserNotificationLogFilter) WhereReactNavigationMessage(p entql.BytesP)
WhereReactNavigationMessage applies the entql json.RawMessage predicate on the react_navigation_message field.
func (f *UserNotificationLogFilter) WhereStatus(p entql.StringP)
WhereStatus applies the entql string predicate on the status field.
func (f *UserNotificationLogFilter) WhereStatusMessage(p entql.StringP)
WhereStatusMessage applies the entql string predicate on the status_message field.
func (f *UserNotificationLogFilter) WhereTrigger(p entql.StringP)
WhereTrigger applies the entql string predicate on the trigger field.
func (f *UserNotificationLogFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
UserNotificationLogGroupBy is the group-by builder for UserNotificationLog entities.
type UserNotificationLogGroupBy struct {
// contains filtered or unexported fields
}
func (unlgb *UserNotificationLogGroupBy) Aggregate(fns ...AggregateFunc) *UserNotificationLogGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *UserNotificationLogGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *UserNotificationLogGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *UserNotificationLogGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *UserNotificationLogGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *UserNotificationLogGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *UserNotificationLogGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *UserNotificationLogGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *UserNotificationLogGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *UserNotificationLogGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *UserNotificationLogGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *UserNotificationLogGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *UserNotificationLogGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (unlgb *UserNotificationLogGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *UserNotificationLogGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *UserNotificationLogGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *UserNotificationLogGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *UserNotificationLogGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *UserNotificationLogGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
UserNotificationLogMutation represents an operation that mutates the UserNotificationLog nodes in the graph.
type UserNotificationLogMutation struct {
// contains filtered or unexported fields
}
func (m *UserNotificationLogMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *UserNotificationLogMutation) AddReceiverIDs(ids ...int)
AddReceiverIDs adds the "receivers" edge to the UserNotificationSetting entity by ids.
func (m *UserNotificationLogMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *UserNotificationLogMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *UserNotificationLogMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *UserNotificationLogMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *UserNotificationLogMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (m *UserNotificationLogMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *UserNotificationLogMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *UserNotificationLogMutation) ClearReceivers()
ClearReceivers clears the "receivers" edge to the UserNotificationSetting entity.
func (m *UserNotificationLogMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (m *UserNotificationLogMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *UserNotificationLogMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m UserNotificationLogMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *UserNotificationLogMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (m *UserNotificationLogMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (m *UserNotificationLogMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *UserNotificationLogMutation) ExpectedDeliveryTime() (r time.Time, exists bool)
ExpectedDeliveryTime returns the value of the "expected_delivery_time" field in the mutation.
func (m *UserNotificationLogMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *UserNotificationLogMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *UserNotificationLogMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *UserNotificationLogMutation) Filter() *UserNotificationLogFilter
Filter returns an entql.Where implementation to apply filters on the UserNotificationLogMutation builder.
func (m *UserNotificationLogMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *UserNotificationLogMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *UserNotificationLogMutation) IsTest() (r bool, exists bool)
IsTest returns the value of the "is_test" field in the mutation.
func (m *UserNotificationLogMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (m *UserNotificationLogMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
OldCreatedAt returns the old "created_at" field's value of the UserNotificationLog entity. If the UserNotificationLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationLogMutation) OldExpectedDeliveryTime(ctx context.Context) (v time.Time, err error)
OldExpectedDeliveryTime returns the old "expected_delivery_time" field's value of the UserNotificationLog entity. If the UserNotificationLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationLogMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *UserNotificationLogMutation) OldIsTest(ctx context.Context) (v bool, err error)
OldIsTest returns the old "is_test" field's value of the UserNotificationLog entity. If the UserNotificationLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationLogMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the UserNotificationLog entity. If the UserNotificationLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationLogMutation) OldReactNavigationMessage(ctx context.Context) (v jsonfields.ReactNavigationPush, err error)
OldReactNavigationMessage returns the old "react_navigation_message" field's value of the UserNotificationLog entity. If the UserNotificationLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationLogMutation) OldStatus(ctx context.Context) (v enums.UserNotificationStatus, err error)
OldStatus returns the old "status" field's value of the UserNotificationLog entity. If the UserNotificationLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationLogMutation) OldStatusMessage(ctx context.Context) (v string, err error)
OldStatusMessage returns the old "status_message" field's value of the UserNotificationLog entity. If the UserNotificationLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationLogMutation) OldTrigger(ctx context.Context) (v string, err error)
OldTrigger returns the old "trigger" field's value of the UserNotificationLog entity. If the UserNotificationLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationLogMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
OldUpdatedAt returns the old "updated_at" field's value of the UserNotificationLog entity. If the UserNotificationLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationLogMutation) Op() Op
Op returns the operation name.
func (m *UserNotificationLogMutation) ReactNavigationMessage() (r jsonfields.ReactNavigationPush, exists bool)
ReactNavigationMessage returns the value of the "react_navigation_message" field in the mutation.
func (m *UserNotificationLogMutation) ReceiversCleared() bool
ReceiversCleared reports if the "receivers" edge to the UserNotificationSetting entity was cleared.
func (m *UserNotificationLogMutation) ReceiversIDs() (ids []int)
ReceiversIDs returns the "receivers" edge IDs in the mutation.
func (m *UserNotificationLogMutation) RemoveReceiverIDs(ids ...int)
RemoveReceiverIDs removes the "receivers" edge to the UserNotificationSetting entity by IDs.
func (m *UserNotificationLogMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *UserNotificationLogMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *UserNotificationLogMutation) RemovedReceiversIDs() (ids []int)
RemovedReceivers returns the removed IDs of the "receivers" edge to the UserNotificationSetting entity.
func (m *UserNotificationLogMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (m *UserNotificationLogMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *UserNotificationLogMutation) ResetExpectedDeliveryTime()
ResetExpectedDeliveryTime resets all changes to the "expected_delivery_time" field.
func (m *UserNotificationLogMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *UserNotificationLogMutation) ResetIsTest()
ResetIsTest resets all changes to the "is_test" field.
func (m *UserNotificationLogMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (m *UserNotificationLogMutation) ResetReactNavigationMessage()
ResetReactNavigationMessage resets all changes to the "react_navigation_message" field.
func (m *UserNotificationLogMutation) ResetReceivers()
ResetReceivers resets all changes to the "receivers" edge.
func (m *UserNotificationLogMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (m *UserNotificationLogMutation) ResetStatusMessage()
ResetStatusMessage resets all changes to the "status_message" field.
func (m *UserNotificationLogMutation) ResetTrigger()
ResetTrigger resets all changes to the "trigger" field.
func (m *UserNotificationLogMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (m *UserNotificationLogMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (m *UserNotificationLogMutation) SetExpectedDeliveryTime(t time.Time)
SetExpectedDeliveryTime sets the "expected_delivery_time" field.
func (m *UserNotificationLogMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *UserNotificationLogMutation) SetIsTest(b bool)
SetIsTest sets the "is_test" field.
func (m *UserNotificationLogMutation) SetKey(s string)
SetKey sets the "key" field.
func (m *UserNotificationLogMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *UserNotificationLogMutation) SetReactNavigationMessage(jnp jsonfields.ReactNavigationPush)
SetReactNavigationMessage sets the "react_navigation_message" field.
func (m *UserNotificationLogMutation) SetStatus(ens enums.UserNotificationStatus)
SetStatus sets the "status" field.
func (m *UserNotificationLogMutation) SetStatusMessage(s string)
SetStatusMessage sets the "status_message" field.
func (m *UserNotificationLogMutation) SetTrigger(s string)
SetTrigger sets the "trigger" field.
func (m *UserNotificationLogMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (m *UserNotificationLogMutation) Status() (r enums.UserNotificationStatus, exists bool)
Status returns the value of the "status" field in the mutation.
func (m *UserNotificationLogMutation) StatusMessage() (r string, exists bool)
StatusMessage returns the value of the "status_message" field in the mutation.
func (m *UserNotificationLogMutation) Trigger() (r string, exists bool)
Trigger returns the value of the "trigger" field in the mutation.
func (m UserNotificationLogMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *UserNotificationLogMutation) Type() string
Type returns the node type of this mutation (UserNotificationLog).
func (m *UserNotificationLogMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (m *UserNotificationLogMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (m *UserNotificationLogMutation) Where(ps ...predicate.UserNotificationLog)
Where appends a list predicates to the UserNotificationLogMutation builder.
func (m *UserNotificationLogMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserNotificationLogMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
UserNotificationLogQuery is the builder for querying UserNotificationLog entities.
type UserNotificationLogQuery struct {
// contains filtered or unexported fields
}
func (unlq *UserNotificationLogQuery) Aggregate(fns ...AggregateFunc) *UserNotificationLogSelect
Aggregate returns a UserNotificationLogSelect configured with the given aggregations.
func (unlq *UserNotificationLogQuery) All(ctx context.Context) ([]*UserNotificationLog, error)
All executes the query and returns a list of UserNotificationLogs.
func (unlq *UserNotificationLogQuery) AllX(ctx context.Context) []*UserNotificationLog
AllX is like All, but panics if an error occurs.
func (unlq *UserNotificationLogQuery) Clone() *UserNotificationLogQuery
Clone returns a duplicate of the UserNotificationLogQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (unlq *UserNotificationLogQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (unlq *UserNotificationLogQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (unlq *UserNotificationLogQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (unlq *UserNotificationLogQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (unlq *UserNotificationLogQuery) Filter() *UserNotificationLogFilter
Filter returns a Filter implementation to apply filters on the UserNotificationLogQuery builder.
func (unlq *UserNotificationLogQuery) First(ctx context.Context) (*UserNotificationLog, error)
First returns the first UserNotificationLog entity from the query. Returns a *NotFoundError when no UserNotificationLog was found.
func (unlq *UserNotificationLogQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserNotificationLog ID from the query. Returns a *NotFoundError when no UserNotificationLog ID was found.
func (unlq *UserNotificationLogQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (unlq *UserNotificationLogQuery) FirstX(ctx context.Context) *UserNotificationLog
FirstX is like First, but panics if an error occurs.
func (unlq *UserNotificationLogQuery) GroupBy(field string, fields ...string) *UserNotificationLogGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.UserNotificationLog.Query().
GroupBy(usernotificationlog.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (unlq *UserNotificationLogQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of UserNotificationLog IDs.
func (unlq *UserNotificationLogQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (unlq *UserNotificationLogQuery) Limit(limit int) *UserNotificationLogQuery
Limit the number of records to be returned by this query.
func (unlq *UserNotificationLogQuery) Offset(offset int) *UserNotificationLogQuery
Offset to start from.
func (unlq *UserNotificationLogQuery) Only(ctx context.Context) (*UserNotificationLog, error)
Only returns a single UserNotificationLog entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserNotificationLog entity is found. Returns a *NotFoundError when no UserNotificationLog entities are found.
func (unlq *UserNotificationLogQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserNotificationLog ID in the query. Returns a *NotSingularError when more than one UserNotificationLog ID is found. Returns a *NotFoundError when no entities are found.
func (unlq *UserNotificationLogQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (unlq *UserNotificationLogQuery) OnlyX(ctx context.Context) *UserNotificationLog
OnlyX is like Only, but panics if an error occurs.
func (unlq *UserNotificationLogQuery) Order(o ...usernotificationlog.Order) *UserNotificationLogQuery
Order specifies how the records should be ordered.
func (unlq *UserNotificationLogQuery) QueryReceivers() *UserNotificationSettingQuery
QueryReceivers chains the current query on the "receivers" edge.
func (unlq *UserNotificationLogQuery) Select(fields ...string) *UserNotificationLogSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.UserNotificationLog.Query().
Select(usernotificationlog.FieldCreatedAt).
Scan(ctx, &v)
func (unlq *UserNotificationLogQuery) Unique(unique bool) *UserNotificationLogQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (unlq *UserNotificationLogQuery) Where(ps ...predicate.UserNotificationLog) *UserNotificationLogQuery
Where adds a new predicate for the UserNotificationLogQuery builder.
func (unlq *UserNotificationLogQuery) WithNamedReceivers(name string, opts ...func(*UserNotificationSettingQuery)) *UserNotificationLogQuery
WithNamedReceivers tells the query-builder to eager-load the nodes that are connected to the "receivers" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (unlq *UserNotificationLogQuery) WithReceivers(opts ...func(*UserNotificationSettingQuery)) *UserNotificationLogQuery
WithReceivers tells the query-builder to eager-load the nodes that are connected to the "receivers" edge. The optional arguments are used to configure the query builder of the edge.
UserNotificationLogSelect is the builder for selecting fields of UserNotificationLog entities.
type UserNotificationLogSelect struct {
*UserNotificationLogQuery
// contains filtered or unexported fields
}
func (unls *UserNotificationLogSelect) Aggregate(fns ...AggregateFunc) *UserNotificationLogSelect
Aggregate adds the given aggregation functions to the selector query.
func (s *UserNotificationLogSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *UserNotificationLogSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *UserNotificationLogSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *UserNotificationLogSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *UserNotificationLogSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *UserNotificationLogSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *UserNotificationLogSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *UserNotificationLogSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *UserNotificationLogSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *UserNotificationLogSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *UserNotificationLogSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *UserNotificationLogSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (unls *UserNotificationLogSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *UserNotificationLogSelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *UserNotificationLogSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *UserNotificationLogSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *UserNotificationLogSelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *UserNotificationLogSelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
UserNotificationLogUpdate is the builder for updating UserNotificationLog entities.
type UserNotificationLogUpdate struct {
// contains filtered or unexported fields
}
func (unlu *UserNotificationLogUpdate) AddReceiverIDs(ids ...int) *UserNotificationLogUpdate
AddReceiverIDs adds the "receivers" edge to the UserNotificationSetting entity by IDs.
func (unlu *UserNotificationLogUpdate) AddReceivers(u ...*UserNotificationSetting) *UserNotificationLogUpdate
AddReceivers adds the "receivers" edges to the UserNotificationSetting entity.
func (unlu *UserNotificationLogUpdate) ClearReceivers() *UserNotificationLogUpdate
ClearReceivers clears all "receivers" edges to the UserNotificationSetting entity.
func (unlu *UserNotificationLogUpdate) ClearUpdatedAt() *UserNotificationLogUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (unlu *UserNotificationLogUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (unlu *UserNotificationLogUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (unlu *UserNotificationLogUpdate) Mutation() *UserNotificationLogMutation
Mutation returns the UserNotificationLogMutation object of the builder.
func (unlu *UserNotificationLogUpdate) RemoveReceiverIDs(ids ...int) *UserNotificationLogUpdate
RemoveReceiverIDs removes the "receivers" edge to UserNotificationSetting entities by IDs.
func (unlu *UserNotificationLogUpdate) RemoveReceivers(u ...*UserNotificationSetting) *UserNotificationLogUpdate
RemoveReceivers removes "receivers" edges to UserNotificationSetting entities.
func (unlu *UserNotificationLogUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (unlu *UserNotificationLogUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (unlu *UserNotificationLogUpdate) SetExpectedDeliveryTime(t time.Time) *UserNotificationLogUpdate
SetExpectedDeliveryTime sets the "expected_delivery_time" field.
func (unlu *UserNotificationLogUpdate) SetIsTest(b bool) *UserNotificationLogUpdate
SetIsTest sets the "is_test" field.
func (unlu *UserNotificationLogUpdate) SetNillableStatus(ens *enums.UserNotificationStatus) *UserNotificationLogUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (unlu *UserNotificationLogUpdate) SetNillableStatusMessage(s *string) *UserNotificationLogUpdate
SetNillableStatusMessage sets the "status_message" field if the given value is not nil.
func (unlu *UserNotificationLogUpdate) SetNillableUpdatedAt(t *time.Time) *UserNotificationLogUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (unlu *UserNotificationLogUpdate) SetReactNavigationMessage(jnp jsonfields.ReactNavigationPush) *UserNotificationLogUpdate
SetReactNavigationMessage sets the "react_navigation_message" field.
func (unlu *UserNotificationLogUpdate) SetStatus(ens enums.UserNotificationStatus) *UserNotificationLogUpdate
SetStatus sets the "status" field.
func (unlu *UserNotificationLogUpdate) SetStatusMessage(s string) *UserNotificationLogUpdate
SetStatusMessage sets the "status_message" field.
func (unlu *UserNotificationLogUpdate) SetUpdatedAt(t time.Time) *UserNotificationLogUpdate
SetUpdatedAt sets the "updated_at" field.
func (unlu *UserNotificationLogUpdate) Where(ps ...predicate.UserNotificationLog) *UserNotificationLogUpdate
Where appends a list predicates to the UserNotificationLogUpdate builder.
UserNotificationLogUpdateOne is the builder for updating a single UserNotificationLog entity.
type UserNotificationLogUpdateOne struct {
// contains filtered or unexported fields
}
func (unluo *UserNotificationLogUpdateOne) AddReceiverIDs(ids ...int) *UserNotificationLogUpdateOne
AddReceiverIDs adds the "receivers" edge to the UserNotificationSetting entity by IDs.
func (unluo *UserNotificationLogUpdateOne) AddReceivers(u ...*UserNotificationSetting) *UserNotificationLogUpdateOne
AddReceivers adds the "receivers" edges to the UserNotificationSetting entity.
func (unluo *UserNotificationLogUpdateOne) ClearReceivers() *UserNotificationLogUpdateOne
ClearReceivers clears all "receivers" edges to the UserNotificationSetting entity.
func (unluo *UserNotificationLogUpdateOne) ClearUpdatedAt() *UserNotificationLogUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (unluo *UserNotificationLogUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (unluo *UserNotificationLogUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (unluo *UserNotificationLogUpdateOne) Mutation() *UserNotificationLogMutation
Mutation returns the UserNotificationLogMutation object of the builder.
func (unluo *UserNotificationLogUpdateOne) RemoveReceiverIDs(ids ...int) *UserNotificationLogUpdateOne
RemoveReceiverIDs removes the "receivers" edge to UserNotificationSetting entities by IDs.
func (unluo *UserNotificationLogUpdateOne) RemoveReceivers(u ...*UserNotificationSetting) *UserNotificationLogUpdateOne
RemoveReceivers removes "receivers" edges to UserNotificationSetting entities.
func (unluo *UserNotificationLogUpdateOne) Save(ctx context.Context) (*UserNotificationLog, error)
Save executes the query and returns the updated UserNotificationLog entity.
func (unluo *UserNotificationLogUpdateOne) SaveX(ctx context.Context) *UserNotificationLog
SaveX is like Save, but panics if an error occurs.
func (unluo *UserNotificationLogUpdateOne) Select(field string, fields ...string) *UserNotificationLogUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (unluo *UserNotificationLogUpdateOne) SetExpectedDeliveryTime(t time.Time) *UserNotificationLogUpdateOne
SetExpectedDeliveryTime sets the "expected_delivery_time" field.
func (unluo *UserNotificationLogUpdateOne) SetIsTest(b bool) *UserNotificationLogUpdateOne
SetIsTest sets the "is_test" field.
func (unluo *UserNotificationLogUpdateOne) SetNillableStatus(ens *enums.UserNotificationStatus) *UserNotificationLogUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (unluo *UserNotificationLogUpdateOne) SetNillableStatusMessage(s *string) *UserNotificationLogUpdateOne
SetNillableStatusMessage sets the "status_message" field if the given value is not nil.
func (unluo *UserNotificationLogUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserNotificationLogUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (unluo *UserNotificationLogUpdateOne) SetReactNavigationMessage(jnp jsonfields.ReactNavigationPush) *UserNotificationLogUpdateOne
SetReactNavigationMessage sets the "react_navigation_message" field.
func (unluo *UserNotificationLogUpdateOne) SetStatus(ens enums.UserNotificationStatus) *UserNotificationLogUpdateOne
SetStatus sets the "status" field.
func (unluo *UserNotificationLogUpdateOne) SetStatusMessage(s string) *UserNotificationLogUpdateOne
SetStatusMessage sets the "status_message" field.
func (unluo *UserNotificationLogUpdateOne) SetUpdatedAt(t time.Time) *UserNotificationLogUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (unluo *UserNotificationLogUpdateOne) Where(ps ...predicate.UserNotificationLog) *UserNotificationLogUpdateOne
Where appends a list predicates to the UserNotificationLogUpdate builder.
UserNotificationLogUpsert is the "OnConflict" setter.
type UserNotificationLogUpsert struct {
*sql.UpdateSet
}
func (u *UserNotificationLogUpsert) ClearUpdatedAt() *UserNotificationLogUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *UserNotificationLogUpsert) SetExpectedDeliveryTime(v time.Time) *UserNotificationLogUpsert
SetExpectedDeliveryTime sets the "expected_delivery_time" field.
func (u *UserNotificationLogUpsert) SetIsTest(v bool) *UserNotificationLogUpsert
SetIsTest sets the "is_test" field.
func (u *UserNotificationLogUpsert) SetReactNavigationMessage(v jsonfields.ReactNavigationPush) *UserNotificationLogUpsert
SetReactNavigationMessage sets the "react_navigation_message" field.
func (u *UserNotificationLogUpsert) SetStatus(v enums.UserNotificationStatus) *UserNotificationLogUpsert
SetStatus sets the "status" field.
func (u *UserNotificationLogUpsert) SetStatusMessage(v string) *UserNotificationLogUpsert
SetStatusMessage sets the "status_message" field.
func (u *UserNotificationLogUpsert) SetUpdatedAt(v time.Time) *UserNotificationLogUpsert
SetUpdatedAt sets the "updated_at" field.
func (u *UserNotificationLogUpsert) UpdateExpectedDeliveryTime() *UserNotificationLogUpsert
UpdateExpectedDeliveryTime sets the "expected_delivery_time" field to the value that was provided on create.
func (u *UserNotificationLogUpsert) UpdateIsTest() *UserNotificationLogUpsert
UpdateIsTest sets the "is_test" field to the value that was provided on create.
func (u *UserNotificationLogUpsert) UpdateReactNavigationMessage() *UserNotificationLogUpsert
UpdateReactNavigationMessage sets the "react_navigation_message" field to the value that was provided on create.
func (u *UserNotificationLogUpsert) UpdateStatus() *UserNotificationLogUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
func (u *UserNotificationLogUpsert) UpdateStatusMessage() *UserNotificationLogUpsert
UpdateStatusMessage sets the "status_message" field to the value that was provided on create.
func (u *UserNotificationLogUpsert) UpdateUpdatedAt() *UserNotificationLogUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
UserNotificationLogUpsertBulk is the builder for "upsert"-ing a bulk of UserNotificationLog nodes.
type UserNotificationLogUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *UserNotificationLogUpsertBulk) ClearUpdatedAt() *UserNotificationLogUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *UserNotificationLogUpsertBulk) DoNothing() *UserNotificationLogUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *UserNotificationLogUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *UserNotificationLogUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *UserNotificationLogUpsertBulk) Ignore() *UserNotificationLogUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.UserNotificationLog.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *UserNotificationLogUpsertBulk) SetExpectedDeliveryTime(v time.Time) *UserNotificationLogUpsertBulk
SetExpectedDeliveryTime sets the "expected_delivery_time" field.
func (u *UserNotificationLogUpsertBulk) SetIsTest(v bool) *UserNotificationLogUpsertBulk
SetIsTest sets the "is_test" field.
func (u *UserNotificationLogUpsertBulk) SetReactNavigationMessage(v jsonfields.ReactNavigationPush) *UserNotificationLogUpsertBulk
SetReactNavigationMessage sets the "react_navigation_message" field.
func (u *UserNotificationLogUpsertBulk) SetStatus(v enums.UserNotificationStatus) *UserNotificationLogUpsertBulk
SetStatus sets the "status" field.
func (u *UserNotificationLogUpsertBulk) SetStatusMessage(v string) *UserNotificationLogUpsertBulk
SetStatusMessage sets the "status_message" field.
func (u *UserNotificationLogUpsertBulk) SetUpdatedAt(v time.Time) *UserNotificationLogUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (u *UserNotificationLogUpsertBulk) Update(set func(*UserNotificationLogUpsert)) *UserNotificationLogUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserNotificationLogCreateBulk.OnConflict documentation for more info.
func (u *UserNotificationLogUpsertBulk) UpdateExpectedDeliveryTime() *UserNotificationLogUpsertBulk
UpdateExpectedDeliveryTime sets the "expected_delivery_time" field to the value that was provided on create.
func (u *UserNotificationLogUpsertBulk) UpdateIsTest() *UserNotificationLogUpsertBulk
UpdateIsTest sets the "is_test" field to the value that was provided on create.
func (u *UserNotificationLogUpsertBulk) UpdateNewValues() *UserNotificationLogUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.UserNotificationLog.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *UserNotificationLogUpsertBulk) UpdateReactNavigationMessage() *UserNotificationLogUpsertBulk
UpdateReactNavigationMessage sets the "react_navigation_message" field to the value that was provided on create.
func (u *UserNotificationLogUpsertBulk) UpdateStatus() *UserNotificationLogUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
func (u *UserNotificationLogUpsertBulk) UpdateStatusMessage() *UserNotificationLogUpsertBulk
UpdateStatusMessage sets the "status_message" field to the value that was provided on create.
func (u *UserNotificationLogUpsertBulk) UpdateUpdatedAt() *UserNotificationLogUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
UserNotificationLogUpsertOne is the builder for "upsert"-ing
one UserNotificationLog node.
type UserNotificationLogUpsertOne struct {
// contains filtered or unexported fields
}
func (u *UserNotificationLogUpsertOne) ClearUpdatedAt() *UserNotificationLogUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *UserNotificationLogUpsertOne) DoNothing() *UserNotificationLogUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *UserNotificationLogUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *UserNotificationLogUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *UserNotificationLogUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *UserNotificationLogUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *UserNotificationLogUpsertOne) Ignore() *UserNotificationLogUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.UserNotificationLog.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *UserNotificationLogUpsertOne) SetExpectedDeliveryTime(v time.Time) *UserNotificationLogUpsertOne
SetExpectedDeliveryTime sets the "expected_delivery_time" field.
func (u *UserNotificationLogUpsertOne) SetIsTest(v bool) *UserNotificationLogUpsertOne
SetIsTest sets the "is_test" field.
func (u *UserNotificationLogUpsertOne) SetReactNavigationMessage(v jsonfields.ReactNavigationPush) *UserNotificationLogUpsertOne
SetReactNavigationMessage sets the "react_navigation_message" field.
func (u *UserNotificationLogUpsertOne) SetStatus(v enums.UserNotificationStatus) *UserNotificationLogUpsertOne
SetStatus sets the "status" field.
func (u *UserNotificationLogUpsertOne) SetStatusMessage(v string) *UserNotificationLogUpsertOne
SetStatusMessage sets the "status_message" field.
func (u *UserNotificationLogUpsertOne) SetUpdatedAt(v time.Time) *UserNotificationLogUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (u *UserNotificationLogUpsertOne) Update(set func(*UserNotificationLogUpsert)) *UserNotificationLogUpsertOne
Update allows overriding fields `UPDATE` values. See the UserNotificationLogCreate.OnConflict documentation for more info.
func (u *UserNotificationLogUpsertOne) UpdateExpectedDeliveryTime() *UserNotificationLogUpsertOne
UpdateExpectedDeliveryTime sets the "expected_delivery_time" field to the value that was provided on create.
func (u *UserNotificationLogUpsertOne) UpdateIsTest() *UserNotificationLogUpsertOne
UpdateIsTest sets the "is_test" field to the value that was provided on create.
func (u *UserNotificationLogUpsertOne) UpdateNewValues() *UserNotificationLogUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.UserNotificationLog.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *UserNotificationLogUpsertOne) UpdateReactNavigationMessage() *UserNotificationLogUpsertOne
UpdateReactNavigationMessage sets the "react_navigation_message" field to the value that was provided on create.
func (u *UserNotificationLogUpsertOne) UpdateStatus() *UserNotificationLogUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
func (u *UserNotificationLogUpsertOne) UpdateStatusMessage() *UserNotificationLogUpsertOne
UpdateStatusMessage sets the "status_message" field to the value that was provided on create.
func (u *UserNotificationLogUpsertOne) UpdateUpdatedAt() *UserNotificationLogUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
UserNotificationLogs is a parsable slice of UserNotificationLog.
type UserNotificationLogs []*UserNotificationLog
UserNotificationSetting is the model entity for the UserNotificationSetting schema.
type UserNotificationSetting struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// expo token
Token string `json:"token,omitempty"`
// expo slug value (project name)
Slug string `json:"slug,omitempty"`
// human friendly name (taken on client side)
Name string `json:"name,omitempty"`
// notify when a new post is created
EnableNewPosts bool `json:"enable_new_posts,omitempty"`
// notify when a payment is started
EnablePaymentStart bool `json:"enable_payment_start,omitempty"`
// notify when a payment due date is close
EnablePaymentDue bool `json:"enable_payment_due,omitempty"`
// OwnerUserID holds the value of the "owner_user_id" field.
OwnerUserID *int `json:"owner_user_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the UserNotificationSettingQuery when eager-loading is set.
Edges UserNotificationSettingEdges `json:"edges"`
// contains filtered or unexported fields
}
func (n *UserNotificationSetting) IsNode()
IsNode implements the Node interface check for GQLGen.
func (uns *UserNotificationSetting) NamedNotificationLogs(name string) ([]*UserNotificationLog, error)
NamedNotificationLogs returns the NotificationLogs named value or an error if the edge was not loaded in eager-loading with this name.
func (uns *UserNotificationSetting) QueryNotificationLogs() *UserNotificationLogQuery
QueryNotificationLogs queries the "notification_logs" edge of the UserNotificationSetting entity.
func (uns *UserNotificationSetting) QueryUser() *UserQuery
QueryUser queries the "user" edge of the UserNotificationSetting entity.
func (uns *UserNotificationSetting) String() string
String implements the fmt.Stringer.
func (uns *UserNotificationSetting) ToEdge(order *UserNotificationSettingOrder) *UserNotificationSettingEdge
ToEdge converts UserNotificationSetting into UserNotificationSettingEdge.
func (uns *UserNotificationSetting) Unwrap() *UserNotificationSetting
Unwrap unwraps the UserNotificationSetting entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (uns *UserNotificationSetting) Update() *UserNotificationSettingUpdateOne
Update returns a builder for updating this UserNotificationSetting. Note that you need to call UserNotificationSetting.Unwrap() before calling this method if this UserNotificationSetting was returned from a transaction, and the transaction was committed or rolled back.
func (uns *UserNotificationSetting) User(ctx context.Context) (*User, error)
func (uns *UserNotificationSetting) Value(name string) (ent.Value, error)
Value returns the ent.Value that was dynamically selected and assigned to the UserNotificationSetting. This includes values selected through modifiers, order, etc.
UserNotificationSettingClient is a client for the UserNotificationSetting schema.
type UserNotificationSettingClient struct {
// contains filtered or unexported fields
}
func NewUserNotificationSettingClient(c config) *UserNotificationSettingClient
NewUserNotificationSettingClient returns a client for the UserNotificationSetting from the given config.
func (c *UserNotificationSettingClient) Create() *UserNotificationSettingCreate
Create returns a builder for creating a UserNotificationSetting entity.
func (c *UserNotificationSettingClient) CreateBulk(builders ...*UserNotificationSettingCreate) *UserNotificationSettingCreateBulk
CreateBulk returns a builder for creating a bulk of UserNotificationSetting entities.
func (c *UserNotificationSettingClient) Delete() *UserNotificationSettingDelete
Delete returns a delete builder for UserNotificationSetting.
func (c *UserNotificationSettingClient) DeleteOne(uns *UserNotificationSetting) *UserNotificationSettingDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (c *UserNotificationSettingClient) DeleteOneID(id int) *UserNotificationSettingDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (c *UserNotificationSettingClient) Get(ctx context.Context, id int) (*UserNotificationSetting, error)
Get returns a UserNotificationSetting entity by its id.
func (c *UserNotificationSettingClient) GetX(ctx context.Context, id int) *UserNotificationSetting
GetX is like Get, but panics if an error occurs.
func (c *UserNotificationSettingClient) Hooks() []Hook
Hooks returns the client hooks.
func (c *UserNotificationSettingClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `usernotificationsetting.Intercept(f(g(h())))`.
func (c *UserNotificationSettingClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (c *UserNotificationSettingClient) Query() *UserNotificationSettingQuery
Query returns a query builder for UserNotificationSetting.
func (c *UserNotificationSettingClient) QueryNotificationLogs(uns *UserNotificationSetting) *UserNotificationLogQuery
QueryNotificationLogs queries the notification_logs edge of a UserNotificationSetting.
func (c *UserNotificationSettingClient) QueryUser(uns *UserNotificationSetting) *UserQuery
QueryUser queries the user edge of a UserNotificationSetting.
func (c *UserNotificationSettingClient) Update() *UserNotificationSettingUpdate
Update returns an update builder for UserNotificationSetting.
func (c *UserNotificationSettingClient) UpdateOne(uns *UserNotificationSetting) *UserNotificationSettingUpdateOne
UpdateOne returns an update builder for the given entity.
func (c *UserNotificationSettingClient) UpdateOneID(id int) *UserNotificationSettingUpdateOne
UpdateOneID returns an update builder for the given id.
func (c *UserNotificationSettingClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usernotificationsetting.Hooks(f(g(h())))`.
UserNotificationSettingConnection is the connection containing edges to UserNotificationSetting.
type UserNotificationSettingConnection struct {
Edges []*UserNotificationSettingEdge `json:"edges"`
PageInfo PageInfo `json:"pageInfo"`
TotalCount int `json:"totalCount"`
}
UserNotificationSettingCreate is the builder for creating a UserNotificationSetting entity.
type UserNotificationSettingCreate struct {
// contains filtered or unexported fields
}
func (unsc *UserNotificationSettingCreate) AddNotificationLogIDs(ids ...int) *UserNotificationSettingCreate
AddNotificationLogIDs adds the "notification_logs" edge to the UserNotificationLog entity by IDs.
func (unsc *UserNotificationSettingCreate) AddNotificationLogs(u ...*UserNotificationLog) *UserNotificationSettingCreate
AddNotificationLogs adds the "notification_logs" edges to the UserNotificationLog entity.
func (unsc *UserNotificationSettingCreate) Exec(ctx context.Context) error
Exec executes the query.
func (unsc *UserNotificationSettingCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (unsc *UserNotificationSettingCreate) Mutation() *UserNotificationSettingMutation
Mutation returns the UserNotificationSettingMutation object of the builder.
func (unsc *UserNotificationSettingCreate) OnConflict(opts ...sql.ConflictOption) *UserNotificationSettingUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.UserNotificationSetting.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.UserNotificationSettingUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (unsc *UserNotificationSettingCreate) OnConflictColumns(columns ...string) *UserNotificationSettingUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.UserNotificationSetting.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (unsc *UserNotificationSettingCreate) Save(ctx context.Context) (*UserNotificationSetting, error)
Save creates the UserNotificationSetting in the database.
func (unsc *UserNotificationSettingCreate) SaveX(ctx context.Context) *UserNotificationSetting
SaveX calls Save and panics if Save returns an error.
func (unsc *UserNotificationSettingCreate) SetCreatedAt(t time.Time) *UserNotificationSettingCreate
SetCreatedAt sets the "created_at" field.
func (unsc *UserNotificationSettingCreate) SetEnableNewPosts(b bool) *UserNotificationSettingCreate
SetEnableNewPosts sets the "enable_new_posts" field.
func (unsc *UserNotificationSettingCreate) SetEnablePaymentDue(b bool) *UserNotificationSettingCreate
SetEnablePaymentDue sets the "enable_payment_due" field.
func (unsc *UserNotificationSettingCreate) SetEnablePaymentStart(b bool) *UserNotificationSettingCreate
SetEnablePaymentStart sets the "enable_payment_start" field.
func (unsc *UserNotificationSettingCreate) SetName(s string) *UserNotificationSettingCreate
SetName sets the "name" field.
func (unsc *UserNotificationSettingCreate) SetNillableCreatedAt(t *time.Time) *UserNotificationSettingCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (unsc *UserNotificationSettingCreate) SetNillableOwnerUserID(i *int) *UserNotificationSettingCreate
SetNillableOwnerUserID sets the "owner_user_id" field if the given value is not nil.
func (unsc *UserNotificationSettingCreate) SetNillableUpdatedAt(t *time.Time) *UserNotificationSettingCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (unsc *UserNotificationSettingCreate) SetNillableUserID(id *int) *UserNotificationSettingCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (unsc *UserNotificationSettingCreate) SetOwnerUserID(i int) *UserNotificationSettingCreate
SetOwnerUserID sets the "owner_user_id" field.
func (unsc *UserNotificationSettingCreate) SetSlug(s string) *UserNotificationSettingCreate
SetSlug sets the "slug" field.
func (unsc *UserNotificationSettingCreate) SetToken(s string) *UserNotificationSettingCreate
SetToken sets the "token" field.
func (unsc *UserNotificationSettingCreate) SetUpdatedAt(t time.Time) *UserNotificationSettingCreate
SetUpdatedAt sets the "updated_at" field.
func (unsc *UserNotificationSettingCreate) SetUser(u *User) *UserNotificationSettingCreate
SetUser sets the "user" edge to the User entity.
func (unsc *UserNotificationSettingCreate) SetUserID(id int) *UserNotificationSettingCreate
SetUserID sets the "user" edge to the User entity by ID.
UserNotificationSettingCreateBulk is the builder for creating many UserNotificationSetting entities in bulk.
type UserNotificationSettingCreateBulk struct {
// contains filtered or unexported fields
}
func (unscb *UserNotificationSettingCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (unscb *UserNotificationSettingCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (unscb *UserNotificationSettingCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserNotificationSettingUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.UserNotificationSetting.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.UserNotificationSettingUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (unscb *UserNotificationSettingCreateBulk) OnConflictColumns(columns ...string) *UserNotificationSettingUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.UserNotificationSetting.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (unscb *UserNotificationSettingCreateBulk) Save(ctx context.Context) ([]*UserNotificationSetting, error)
Save creates the UserNotificationSetting entities in the database.
func (unscb *UserNotificationSettingCreateBulk) SaveX(ctx context.Context) []*UserNotificationSetting
SaveX is like Save, but panics if an error occurs.
UserNotificationSettingDelete is the builder for deleting a UserNotificationSetting entity.
type UserNotificationSettingDelete struct {
// contains filtered or unexported fields
}
func (unsd *UserNotificationSettingDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (unsd *UserNotificationSettingDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (unsd *UserNotificationSettingDelete) Where(ps ...predicate.UserNotificationSetting) *UserNotificationSettingDelete
Where appends a list predicates to the UserNotificationSettingDelete builder.
UserNotificationSettingDeleteOne is the builder for deleting a single UserNotificationSetting entity.
type UserNotificationSettingDeleteOne struct {
// contains filtered or unexported fields
}
func (unsdo *UserNotificationSettingDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (unsdo *UserNotificationSettingDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (unsdo *UserNotificationSettingDeleteOne) Where(ps ...predicate.UserNotificationSetting) *UserNotificationSettingDeleteOne
Where appends a list predicates to the UserNotificationSettingDelete builder.
UserNotificationSettingEdge is the edge representation of UserNotificationSetting.
type UserNotificationSettingEdge struct {
Node *UserNotificationSetting `json:"node"`
Cursor Cursor `json:"cursor"`
}
UserNotificationSettingEdges holds the relations/edges for other nodes in the graph.
type UserNotificationSettingEdges struct {
// User holds the value of the user edge.
User *User `json:"user,omitempty"`
// NotificationLogs holds the value of the notification_logs edge.
NotificationLogs []*UserNotificationLog `json:"notification_logs,omitempty"`
// contains filtered or unexported fields
}
func (e UserNotificationSettingEdges) NotificationLogsOrErr() ([]*UserNotificationLog, error)
NotificationLogsOrErr returns the NotificationLogs value or an error if the edge was not loaded in eager-loading.
func (e UserNotificationSettingEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
UserNotificationSettingFilter provides a generic filtering capability at runtime for UserNotificationSettingQuery.
type UserNotificationSettingFilter struct {
// contains filtered or unexported fields
}
func (f *UserNotificationSettingFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (f *UserNotificationSettingFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (f *UserNotificationSettingFilter) WhereEnableNewPosts(p entql.BoolP)
WhereEnableNewPosts applies the entql bool predicate on the enable_new_posts field.
func (f *UserNotificationSettingFilter) WhereEnablePaymentDue(p entql.BoolP)
WhereEnablePaymentDue applies the entql bool predicate on the enable_payment_due field.
func (f *UserNotificationSettingFilter) WhereEnablePaymentStart(p entql.BoolP)
WhereEnablePaymentStart applies the entql bool predicate on the enable_payment_start field.
func (f *UserNotificationSettingFilter) WhereHasNotificationLogs()
WhereHasNotificationLogs applies a predicate to check if query has an edge notification_logs.
func (f *UserNotificationSettingFilter) WhereHasNotificationLogsWith(preds ...predicate.UserNotificationLog)
WhereHasNotificationLogsWith applies a predicate to check if query has an edge notification_logs with a given conditions (other predicates).
func (f *UserNotificationSettingFilter) WhereHasUser()
WhereHasUser applies a predicate to check if query has an edge user.
func (f *UserNotificationSettingFilter) WhereHasUserWith(preds ...predicate.User)
WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).
func (f *UserNotificationSettingFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (f *UserNotificationSettingFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
func (f *UserNotificationSettingFilter) WhereOwnerUserID(p entql.IntP)
WhereOwnerUserID applies the entql int predicate on the owner_user_id field.
func (f *UserNotificationSettingFilter) WhereSlug(p entql.StringP)
WhereSlug applies the entql string predicate on the slug field.
func (f *UserNotificationSettingFilter) WhereToken(p entql.StringP)
WhereToken applies the entql string predicate on the token field.
func (f *UserNotificationSettingFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
UserNotificationSettingGroupBy is the group-by builder for UserNotificationSetting entities.
type UserNotificationSettingGroupBy struct {
// contains filtered or unexported fields
}
func (unsgb *UserNotificationSettingGroupBy) Aggregate(fns ...AggregateFunc) *UserNotificationSettingGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (s *UserNotificationSettingGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *UserNotificationSettingGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *UserNotificationSettingGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *UserNotificationSettingGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *UserNotificationSettingGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *UserNotificationSettingGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *UserNotificationSettingGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *UserNotificationSettingGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *UserNotificationSettingGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *UserNotificationSettingGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *UserNotificationSettingGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *UserNotificationSettingGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (unsgb *UserNotificationSettingGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *UserNotificationSettingGroupBy) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *UserNotificationSettingGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *UserNotificationSettingGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *UserNotificationSettingGroupBy) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *UserNotificationSettingGroupBy) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
UserNotificationSettingMutation represents an operation that mutates the UserNotificationSetting nodes in the graph.
type UserNotificationSettingMutation struct {
// contains filtered or unexported fields
}
func (m *UserNotificationSettingMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *UserNotificationSettingMutation) AddNotificationLogIDs(ids ...int)
AddNotificationLogIDs adds the "notification_logs" edge to the UserNotificationLog entity by ids.
func (m *UserNotificationSettingMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (m *UserNotificationSettingMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *UserNotificationSettingMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (m *UserNotificationSettingMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (m *UserNotificationSettingMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (m *UserNotificationSettingMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (m *UserNotificationSettingMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (m *UserNotificationSettingMutation) ClearNotificationLogs()
ClearNotificationLogs clears the "notification_logs" edge to the UserNotificationLog entity.
func (m *UserNotificationSettingMutation) ClearOwnerUserID()
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (m *UserNotificationSettingMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (m *UserNotificationSettingMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (m *UserNotificationSettingMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (m *UserNotificationSettingMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (m UserNotificationSettingMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (m *UserNotificationSettingMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (m *UserNotificationSettingMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (m *UserNotificationSettingMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (m *UserNotificationSettingMutation) EnableNewPosts() (r bool, exists bool)
EnableNewPosts returns the value of the "enable_new_posts" field in the mutation.
func (m *UserNotificationSettingMutation) EnablePaymentDue() (r bool, exists bool)
EnablePaymentDue returns the value of the "enable_payment_due" field in the mutation.
func (m *UserNotificationSettingMutation) EnablePaymentStart() (r bool, exists bool)
EnablePaymentStart returns the value of the "enable_payment_start" field in the mutation.
func (m *UserNotificationSettingMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (m *UserNotificationSettingMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (m *UserNotificationSettingMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (m *UserNotificationSettingMutation) Filter() *UserNotificationSettingFilter
Filter returns an entql.Where implementation to apply filters on the UserNotificationSettingMutation builder.
func (m *UserNotificationSettingMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (m *UserNotificationSettingMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (m *UserNotificationSettingMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (m *UserNotificationSettingMutation) NotificationLogsCleared() bool
NotificationLogsCleared reports if the "notification_logs" edge to the UserNotificationLog entity was cleared.
func (m *UserNotificationSettingMutation) NotificationLogsIDs() (ids []int)
NotificationLogsIDs returns the "notification_logs" edge IDs in the mutation.
func (m *UserNotificationSettingMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
OldCreatedAt returns the old "created_at" field's value of the UserNotificationSetting entity. If the UserNotificationSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationSettingMutation) OldEnableNewPosts(ctx context.Context) (v bool, err error)
OldEnableNewPosts returns the old "enable_new_posts" field's value of the UserNotificationSetting entity. If the UserNotificationSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationSettingMutation) OldEnablePaymentDue(ctx context.Context) (v bool, err error)
OldEnablePaymentDue returns the old "enable_payment_due" field's value of the UserNotificationSetting entity. If the UserNotificationSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationSettingMutation) OldEnablePaymentStart(ctx context.Context) (v bool, err error)
OldEnablePaymentStart returns the old "enable_payment_start" field's value of the UserNotificationSetting entity. If the UserNotificationSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationSettingMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (m *UserNotificationSettingMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the UserNotificationSetting entity. If the UserNotificationSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationSettingMutation) OldOwnerUserID(ctx context.Context) (v *int, err error)
OldOwnerUserID returns the old "owner_user_id" field's value of the UserNotificationSetting entity. If the UserNotificationSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationSettingMutation) OldSlug(ctx context.Context) (v string, err error)
OldSlug returns the old "slug" field's value of the UserNotificationSetting entity. If the UserNotificationSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationSettingMutation) OldToken(ctx context.Context) (v string, err error)
OldToken returns the old "token" field's value of the UserNotificationSetting entity. If the UserNotificationSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationSettingMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
OldUpdatedAt returns the old "updated_at" field's value of the UserNotificationSetting entity. If the UserNotificationSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *UserNotificationSettingMutation) Op() Op
Op returns the operation name.
func (m *UserNotificationSettingMutation) OwnerUserID() (r int, exists bool)
OwnerUserID returns the value of the "owner_user_id" field in the mutation.
func (m *UserNotificationSettingMutation) OwnerUserIDCleared() bool
OwnerUserIDCleared returns if the "owner_user_id" field was cleared in this mutation.
func (m *UserNotificationSettingMutation) RemoveNotificationLogIDs(ids ...int)
RemoveNotificationLogIDs removes the "notification_logs" edge to the UserNotificationLog entity by IDs.
func (m *UserNotificationSettingMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (m *UserNotificationSettingMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (m *UserNotificationSettingMutation) RemovedNotificationLogsIDs() (ids []int)
RemovedNotificationLogs returns the removed IDs of the "notification_logs" edge to the UserNotificationLog entity.
func (m *UserNotificationSettingMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (m *UserNotificationSettingMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (m *UserNotificationSettingMutation) ResetEnableNewPosts()
ResetEnableNewPosts resets all changes to the "enable_new_posts" field.
func (m *UserNotificationSettingMutation) ResetEnablePaymentDue()
ResetEnablePaymentDue resets all changes to the "enable_payment_due" field.
func (m *UserNotificationSettingMutation) ResetEnablePaymentStart()
ResetEnablePaymentStart resets all changes to the "enable_payment_start" field.
func (m *UserNotificationSettingMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (m *UserNotificationSettingMutation) ResetName()
ResetName resets all changes to the "name" field.
func (m *UserNotificationSettingMutation) ResetNotificationLogs()
ResetNotificationLogs resets all changes to the "notification_logs" edge.
func (m *UserNotificationSettingMutation) ResetOwnerUserID()
ResetOwnerUserID resets all changes to the "owner_user_id" field.
func (m *UserNotificationSettingMutation) ResetSlug()
ResetSlug resets all changes to the "slug" field.
func (m *UserNotificationSettingMutation) ResetToken()
ResetToken resets all changes to the "token" field.
func (m *UserNotificationSettingMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (m *UserNotificationSettingMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (m *UserNotificationSettingMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (m *UserNotificationSettingMutation) SetEnableNewPosts(b bool)
SetEnableNewPosts sets the "enable_new_posts" field.
func (m *UserNotificationSettingMutation) SetEnablePaymentDue(b bool)
SetEnablePaymentDue sets the "enable_payment_due" field.
func (m *UserNotificationSettingMutation) SetEnablePaymentStart(b bool)
SetEnablePaymentStart sets the "enable_payment_start" field.
func (m *UserNotificationSettingMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (m *UserNotificationSettingMutation) SetName(s string)
SetName sets the "name" field.
func (m *UserNotificationSettingMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (m *UserNotificationSettingMutation) SetOwnerUserID(i int)
SetOwnerUserID sets the "owner_user_id" field.
func (m *UserNotificationSettingMutation) SetSlug(s string)
SetSlug sets the "slug" field.
func (m *UserNotificationSettingMutation) SetToken(s string)
SetToken sets the "token" field.
func (m *UserNotificationSettingMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (m *UserNotificationSettingMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (m *UserNotificationSettingMutation) Slug() (r string, exists bool)
Slug returns the value of the "slug" field in the mutation.
func (m *UserNotificationSettingMutation) Token() (r string, exists bool)
Token returns the value of the "token" field in the mutation.
func (m UserNotificationSettingMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (m *UserNotificationSettingMutation) Type() string
Type returns the node type of this mutation (UserNotificationSetting).
func (m *UserNotificationSettingMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (m *UserNotificationSettingMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (m *UserNotificationSettingMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (m *UserNotificationSettingMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (m *UserNotificationSettingMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (m *UserNotificationSettingMutation) Where(ps ...predicate.UserNotificationSetting)
Where appends a list predicates to the UserNotificationSettingMutation builder.
func (m *UserNotificationSettingMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserNotificationSettingMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
UserNotificationSettingOrder defines the ordering of UserNotificationSetting.
type UserNotificationSettingOrder struct {
Direction OrderDirection `json:"direction"`
Field *UserNotificationSettingOrderField `json:"field"`
}
UserNotificationSettingOrderField defines the ordering field of UserNotificationSetting.
type UserNotificationSettingOrderField struct {
// contains filtered or unexported fields
}
UserNotificationSettingPaginateOption enables pagination customization.
type UserNotificationSettingPaginateOption func(*usernotificationsettingPager) error
func WithUserNotificationSettingFilter(filter func(*UserNotificationSettingQuery) (*UserNotificationSettingQuery, error)) UserNotificationSettingPaginateOption
WithUserNotificationSettingFilter configures pagination filter.
func WithUserNotificationSettingOrder(order *UserNotificationSettingOrder) UserNotificationSettingPaginateOption
WithUserNotificationSettingOrder configures pagination ordering.
UserNotificationSettingQuery is the builder for querying UserNotificationSetting entities.
type UserNotificationSettingQuery struct {
// contains filtered or unexported fields
}
func (unsq *UserNotificationSettingQuery) Aggregate(fns ...AggregateFunc) *UserNotificationSettingSelect
Aggregate returns a UserNotificationSettingSelect configured with the given aggregations.
func (unsq *UserNotificationSettingQuery) All(ctx context.Context) ([]*UserNotificationSetting, error)
All executes the query and returns a list of UserNotificationSettings.
func (unsq *UserNotificationSettingQuery) AllX(ctx context.Context) []*UserNotificationSetting
AllX is like All, but panics if an error occurs.
func (unsq *UserNotificationSettingQuery) Clone() *UserNotificationSettingQuery
Clone returns a duplicate of the UserNotificationSettingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (uns *UserNotificationSettingQuery) CollectFields(ctx context.Context, satisfies ...string) (*UserNotificationSettingQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (unsq *UserNotificationSettingQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (unsq *UserNotificationSettingQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (unsq *UserNotificationSettingQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (unsq *UserNotificationSettingQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (unsq *UserNotificationSettingQuery) Filter() *UserNotificationSettingFilter
Filter returns a Filter implementation to apply filters on the UserNotificationSettingQuery builder.
func (unsq *UserNotificationSettingQuery) First(ctx context.Context) (*UserNotificationSetting, error)
First returns the first UserNotificationSetting entity from the query. Returns a *NotFoundError when no UserNotificationSetting was found.
func (unsq *UserNotificationSettingQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserNotificationSetting ID from the query. Returns a *NotFoundError when no UserNotificationSetting ID was found.
func (unsq *UserNotificationSettingQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (unsq *UserNotificationSettingQuery) FirstX(ctx context.Context) *UserNotificationSetting
FirstX is like First, but panics if an error occurs.
func (unsq *UserNotificationSettingQuery) GroupBy(field string, fields ...string) *UserNotificationSettingGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.UserNotificationSetting.Query().
GroupBy(usernotificationsetting.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (unsq *UserNotificationSettingQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of UserNotificationSetting IDs.
func (unsq *UserNotificationSettingQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (unsq *UserNotificationSettingQuery) Limit(limit int) *UserNotificationSettingQuery
Limit the number of records to be returned by this query.
func (unsq *UserNotificationSettingQuery) Offset(offset int) *UserNotificationSettingQuery
Offset to start from.
func (unsq *UserNotificationSettingQuery) Only(ctx context.Context) (*UserNotificationSetting, error)
Only returns a single UserNotificationSetting entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserNotificationSetting entity is found. Returns a *NotFoundError when no UserNotificationSetting entities are found.
func (unsq *UserNotificationSettingQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserNotificationSetting ID in the query. Returns a *NotSingularError when more than one UserNotificationSetting ID is found. Returns a *NotFoundError when no entities are found.
func (unsq *UserNotificationSettingQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (unsq *UserNotificationSettingQuery) OnlyX(ctx context.Context) *UserNotificationSetting
OnlyX is like Only, but panics if an error occurs.
func (unsq *UserNotificationSettingQuery) Order(o ...usernotificationsetting.Order) *UserNotificationSettingQuery
Order specifies how the records should be ordered.
func (uns *UserNotificationSettingQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...UserNotificationSettingPaginateOption, ) (*UserNotificationSettingConnection, error)
Paginate executes the query and returns a relay based cursor connection to UserNotificationSetting.
func (unsq *UserNotificationSettingQuery) QueryNotificationLogs() *UserNotificationLogQuery
QueryNotificationLogs chains the current query on the "notification_logs" edge.
func (unsq *UserNotificationSettingQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (unsq *UserNotificationSettingQuery) Select(fields ...string) *UserNotificationSettingSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.UserNotificationSetting.Query().
Select(usernotificationsetting.FieldCreatedAt).
Scan(ctx, &v)
func (unsq *UserNotificationSettingQuery) Unique(unique bool) *UserNotificationSettingQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (unsq *UserNotificationSettingQuery) Where(ps ...predicate.UserNotificationSetting) *UserNotificationSettingQuery
Where adds a new predicate for the UserNotificationSettingQuery builder.
func (unsq *UserNotificationSettingQuery) WithNamedNotificationLogs(name string, opts ...func(*UserNotificationLogQuery)) *UserNotificationSettingQuery
WithNamedNotificationLogs tells the query-builder to eager-load the nodes that are connected to the "notification_logs" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (unsq *UserNotificationSettingQuery) WithNotificationLogs(opts ...func(*UserNotificationLogQuery)) *UserNotificationSettingQuery
WithNotificationLogs tells the query-builder to eager-load the nodes that are connected to the "notification_logs" edge. The optional arguments are used to configure the query builder of the edge.
func (unsq *UserNotificationSettingQuery) WithUser(opts ...func(*UserQuery)) *UserNotificationSettingQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
UserNotificationSettingSelect is the builder for selecting fields of UserNotificationSetting entities.
type UserNotificationSettingSelect struct {
*UserNotificationSettingQuery
// contains filtered or unexported fields
}
func (unss *UserNotificationSettingSelect) Aggregate(fns ...AggregateFunc) *UserNotificationSettingSelect
Aggregate adds the given aggregation functions to the selector query.
func (s *UserNotificationSettingSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *UserNotificationSettingSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *UserNotificationSettingSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *UserNotificationSettingSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *UserNotificationSettingSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *UserNotificationSettingSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *UserNotificationSettingSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *UserNotificationSettingSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *UserNotificationSettingSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *UserNotificationSettingSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *UserNotificationSettingSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *UserNotificationSettingSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (unss *UserNotificationSettingSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *UserNotificationSettingSelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *UserNotificationSettingSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *UserNotificationSettingSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *UserNotificationSettingSelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *UserNotificationSettingSelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
UserNotificationSettingUpdate is the builder for updating UserNotificationSetting entities.
type UserNotificationSettingUpdate struct {
// contains filtered or unexported fields
}
func (unsu *UserNotificationSettingUpdate) AddNotificationLogIDs(ids ...int) *UserNotificationSettingUpdate
AddNotificationLogIDs adds the "notification_logs" edge to the UserNotificationLog entity by IDs.
func (unsu *UserNotificationSettingUpdate) AddNotificationLogs(u ...*UserNotificationLog) *UserNotificationSettingUpdate
AddNotificationLogs adds the "notification_logs" edges to the UserNotificationLog entity.
func (unsu *UserNotificationSettingUpdate) ClearNotificationLogs() *UserNotificationSettingUpdate
ClearNotificationLogs clears all "notification_logs" edges to the UserNotificationLog entity.
func (unsu *UserNotificationSettingUpdate) ClearOwnerUserID() *UserNotificationSettingUpdate
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (unsu *UserNotificationSettingUpdate) ClearUpdatedAt() *UserNotificationSettingUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (unsu *UserNotificationSettingUpdate) ClearUser() *UserNotificationSettingUpdate
ClearUser clears the "user" edge to the User entity.
func (unsu *UserNotificationSettingUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (unsu *UserNotificationSettingUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (unsu *UserNotificationSettingUpdate) Mutation() *UserNotificationSettingMutation
Mutation returns the UserNotificationSettingMutation object of the builder.
func (unsu *UserNotificationSettingUpdate) RemoveNotificationLogIDs(ids ...int) *UserNotificationSettingUpdate
RemoveNotificationLogIDs removes the "notification_logs" edge to UserNotificationLog entities by IDs.
func (unsu *UserNotificationSettingUpdate) RemoveNotificationLogs(u ...*UserNotificationLog) *UserNotificationSettingUpdate
RemoveNotificationLogs removes "notification_logs" edges to UserNotificationLog entities.
func (unsu *UserNotificationSettingUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (unsu *UserNotificationSettingUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (unsu *UserNotificationSettingUpdate) SetEnableNewPosts(b bool) *UserNotificationSettingUpdate
SetEnableNewPosts sets the "enable_new_posts" field.
func (unsu *UserNotificationSettingUpdate) SetEnablePaymentDue(b bool) *UserNotificationSettingUpdate
SetEnablePaymentDue sets the "enable_payment_due" field.
func (unsu *UserNotificationSettingUpdate) SetEnablePaymentStart(b bool) *UserNotificationSettingUpdate
SetEnablePaymentStart sets the "enable_payment_start" field.
func (unsu *UserNotificationSettingUpdate) SetName(s string) *UserNotificationSettingUpdate
SetName sets the "name" field.
func (unsu *UserNotificationSettingUpdate) SetNillableOwnerUserID(i *int) *UserNotificationSettingUpdate
SetNillableOwnerUserID sets the "owner_user_id" field if the given value is not nil.
func (unsu *UserNotificationSettingUpdate) SetNillableUpdatedAt(t *time.Time) *UserNotificationSettingUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (unsu *UserNotificationSettingUpdate) SetNillableUserID(id *int) *UserNotificationSettingUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (unsu *UserNotificationSettingUpdate) SetOwnerUserID(i int) *UserNotificationSettingUpdate
SetOwnerUserID sets the "owner_user_id" field.
func (unsu *UserNotificationSettingUpdate) SetSlug(s string) *UserNotificationSettingUpdate
SetSlug sets the "slug" field.
func (unsu *UserNotificationSettingUpdate) SetToken(s string) *UserNotificationSettingUpdate
SetToken sets the "token" field.
func (unsu *UserNotificationSettingUpdate) SetUpdatedAt(t time.Time) *UserNotificationSettingUpdate
SetUpdatedAt sets the "updated_at" field.
func (unsu *UserNotificationSettingUpdate) SetUser(u *User) *UserNotificationSettingUpdate
SetUser sets the "user" edge to the User entity.
func (unsu *UserNotificationSettingUpdate) SetUserID(id int) *UserNotificationSettingUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (unsu *UserNotificationSettingUpdate) Where(ps ...predicate.UserNotificationSetting) *UserNotificationSettingUpdate
Where appends a list predicates to the UserNotificationSettingUpdate builder.
UserNotificationSettingUpdateOne is the builder for updating a single UserNotificationSetting entity.
type UserNotificationSettingUpdateOne struct {
// contains filtered or unexported fields
}
func (unsuo *UserNotificationSettingUpdateOne) AddNotificationLogIDs(ids ...int) *UserNotificationSettingUpdateOne
AddNotificationLogIDs adds the "notification_logs" edge to the UserNotificationLog entity by IDs.
func (unsuo *UserNotificationSettingUpdateOne) AddNotificationLogs(u ...*UserNotificationLog) *UserNotificationSettingUpdateOne
AddNotificationLogs adds the "notification_logs" edges to the UserNotificationLog entity.
func (unsuo *UserNotificationSettingUpdateOne) ClearNotificationLogs() *UserNotificationSettingUpdateOne
ClearNotificationLogs clears all "notification_logs" edges to the UserNotificationLog entity.
func (unsuo *UserNotificationSettingUpdateOne) ClearOwnerUserID() *UserNotificationSettingUpdateOne
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (unsuo *UserNotificationSettingUpdateOne) ClearUpdatedAt() *UserNotificationSettingUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (unsuo *UserNotificationSettingUpdateOne) ClearUser() *UserNotificationSettingUpdateOne
ClearUser clears the "user" edge to the User entity.
func (unsuo *UserNotificationSettingUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (unsuo *UserNotificationSettingUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (unsuo *UserNotificationSettingUpdateOne) Mutation() *UserNotificationSettingMutation
Mutation returns the UserNotificationSettingMutation object of the builder.
func (unsuo *UserNotificationSettingUpdateOne) RemoveNotificationLogIDs(ids ...int) *UserNotificationSettingUpdateOne
RemoveNotificationLogIDs removes the "notification_logs" edge to UserNotificationLog entities by IDs.
func (unsuo *UserNotificationSettingUpdateOne) RemoveNotificationLogs(u ...*UserNotificationLog) *UserNotificationSettingUpdateOne
RemoveNotificationLogs removes "notification_logs" edges to UserNotificationLog entities.
func (unsuo *UserNotificationSettingUpdateOne) Save(ctx context.Context) (*UserNotificationSetting, error)
Save executes the query and returns the updated UserNotificationSetting entity.
func (unsuo *UserNotificationSettingUpdateOne) SaveX(ctx context.Context) *UserNotificationSetting
SaveX is like Save, but panics if an error occurs.
func (unsuo *UserNotificationSettingUpdateOne) Select(field string, fields ...string) *UserNotificationSettingUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (unsuo *UserNotificationSettingUpdateOne) SetEnableNewPosts(b bool) *UserNotificationSettingUpdateOne
SetEnableNewPosts sets the "enable_new_posts" field.
func (unsuo *UserNotificationSettingUpdateOne) SetEnablePaymentDue(b bool) *UserNotificationSettingUpdateOne
SetEnablePaymentDue sets the "enable_payment_due" field.
func (unsuo *UserNotificationSettingUpdateOne) SetEnablePaymentStart(b bool) *UserNotificationSettingUpdateOne
SetEnablePaymentStart sets the "enable_payment_start" field.
func (unsuo *UserNotificationSettingUpdateOne) SetName(s string) *UserNotificationSettingUpdateOne
SetName sets the "name" field.
func (unsuo *UserNotificationSettingUpdateOne) SetNillableOwnerUserID(i *int) *UserNotificationSettingUpdateOne
SetNillableOwnerUserID sets the "owner_user_id" field if the given value is not nil.
func (unsuo *UserNotificationSettingUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserNotificationSettingUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (unsuo *UserNotificationSettingUpdateOne) SetNillableUserID(id *int) *UserNotificationSettingUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (unsuo *UserNotificationSettingUpdateOne) SetOwnerUserID(i int) *UserNotificationSettingUpdateOne
SetOwnerUserID sets the "owner_user_id" field.
func (unsuo *UserNotificationSettingUpdateOne) SetSlug(s string) *UserNotificationSettingUpdateOne
SetSlug sets the "slug" field.
func (unsuo *UserNotificationSettingUpdateOne) SetToken(s string) *UserNotificationSettingUpdateOne
SetToken sets the "token" field.
func (unsuo *UserNotificationSettingUpdateOne) SetUpdatedAt(t time.Time) *UserNotificationSettingUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (unsuo *UserNotificationSettingUpdateOne) SetUser(u *User) *UserNotificationSettingUpdateOne
SetUser sets the "user" edge to the User entity.
func (unsuo *UserNotificationSettingUpdateOne) SetUserID(id int) *UserNotificationSettingUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (unsuo *UserNotificationSettingUpdateOne) Where(ps ...predicate.UserNotificationSetting) *UserNotificationSettingUpdateOne
Where appends a list predicates to the UserNotificationSettingUpdate builder.
UserNotificationSettingUpsert is the "OnConflict" setter.
type UserNotificationSettingUpsert struct {
*sql.UpdateSet
}
func (u *UserNotificationSettingUpsert) ClearOwnerUserID() *UserNotificationSettingUpsert
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (u *UserNotificationSettingUpsert) ClearUpdatedAt() *UserNotificationSettingUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *UserNotificationSettingUpsert) SetEnableNewPosts(v bool) *UserNotificationSettingUpsert
SetEnableNewPosts sets the "enable_new_posts" field.
func (u *UserNotificationSettingUpsert) SetEnablePaymentDue(v bool) *UserNotificationSettingUpsert
SetEnablePaymentDue sets the "enable_payment_due" field.
func (u *UserNotificationSettingUpsert) SetEnablePaymentStart(v bool) *UserNotificationSettingUpsert
SetEnablePaymentStart sets the "enable_payment_start" field.
func (u *UserNotificationSettingUpsert) SetName(v string) *UserNotificationSettingUpsert
SetName sets the "name" field.
func (u *UserNotificationSettingUpsert) SetOwnerUserID(v int) *UserNotificationSettingUpsert
SetOwnerUserID sets the "owner_user_id" field.
func (u *UserNotificationSettingUpsert) SetSlug(v string) *UserNotificationSettingUpsert
SetSlug sets the "slug" field.
func (u *UserNotificationSettingUpsert) SetToken(v string) *UserNotificationSettingUpsert
SetToken sets the "token" field.
func (u *UserNotificationSettingUpsert) SetUpdatedAt(v time.Time) *UserNotificationSettingUpsert
SetUpdatedAt sets the "updated_at" field.
func (u *UserNotificationSettingUpsert) UpdateEnableNewPosts() *UserNotificationSettingUpsert
UpdateEnableNewPosts sets the "enable_new_posts" field to the value that was provided on create.
func (u *UserNotificationSettingUpsert) UpdateEnablePaymentDue() *UserNotificationSettingUpsert
UpdateEnablePaymentDue sets the "enable_payment_due" field to the value that was provided on create.
func (u *UserNotificationSettingUpsert) UpdateEnablePaymentStart() *UserNotificationSettingUpsert
UpdateEnablePaymentStart sets the "enable_payment_start" field to the value that was provided on create.
func (u *UserNotificationSettingUpsert) UpdateName() *UserNotificationSettingUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (u *UserNotificationSettingUpsert) UpdateOwnerUserID() *UserNotificationSettingUpsert
UpdateOwnerUserID sets the "owner_user_id" field to the value that was provided on create.
func (u *UserNotificationSettingUpsert) UpdateSlug() *UserNotificationSettingUpsert
UpdateSlug sets the "slug" field to the value that was provided on create.
func (u *UserNotificationSettingUpsert) UpdateToken() *UserNotificationSettingUpsert
UpdateToken sets the "token" field to the value that was provided on create.
func (u *UserNotificationSettingUpsert) UpdateUpdatedAt() *UserNotificationSettingUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
UserNotificationSettingUpsertBulk is the builder for "upsert"-ing a bulk of UserNotificationSetting nodes.
type UserNotificationSettingUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *UserNotificationSettingUpsertBulk) ClearOwnerUserID() *UserNotificationSettingUpsertBulk
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (u *UserNotificationSettingUpsertBulk) ClearUpdatedAt() *UserNotificationSettingUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *UserNotificationSettingUpsertBulk) DoNothing() *UserNotificationSettingUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *UserNotificationSettingUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *UserNotificationSettingUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *UserNotificationSettingUpsertBulk) Ignore() *UserNotificationSettingUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.UserNotificationSetting.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *UserNotificationSettingUpsertBulk) SetEnableNewPosts(v bool) *UserNotificationSettingUpsertBulk
SetEnableNewPosts sets the "enable_new_posts" field.
func (u *UserNotificationSettingUpsertBulk) SetEnablePaymentDue(v bool) *UserNotificationSettingUpsertBulk
SetEnablePaymentDue sets the "enable_payment_due" field.
func (u *UserNotificationSettingUpsertBulk) SetEnablePaymentStart(v bool) *UserNotificationSettingUpsertBulk
SetEnablePaymentStart sets the "enable_payment_start" field.
func (u *UserNotificationSettingUpsertBulk) SetName(v string) *UserNotificationSettingUpsertBulk
SetName sets the "name" field.
func (u *UserNotificationSettingUpsertBulk) SetOwnerUserID(v int) *UserNotificationSettingUpsertBulk
SetOwnerUserID sets the "owner_user_id" field.
func (u *UserNotificationSettingUpsertBulk) SetSlug(v string) *UserNotificationSettingUpsertBulk
SetSlug sets the "slug" field.
func (u *UserNotificationSettingUpsertBulk) SetToken(v string) *UserNotificationSettingUpsertBulk
SetToken sets the "token" field.
func (u *UserNotificationSettingUpsertBulk) SetUpdatedAt(v time.Time) *UserNotificationSettingUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (u *UserNotificationSettingUpsertBulk) Update(set func(*UserNotificationSettingUpsert)) *UserNotificationSettingUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserNotificationSettingCreateBulk.OnConflict documentation for more info.
func (u *UserNotificationSettingUpsertBulk) UpdateEnableNewPosts() *UserNotificationSettingUpsertBulk
UpdateEnableNewPosts sets the "enable_new_posts" field to the value that was provided on create.
func (u *UserNotificationSettingUpsertBulk) UpdateEnablePaymentDue() *UserNotificationSettingUpsertBulk
UpdateEnablePaymentDue sets the "enable_payment_due" field to the value that was provided on create.
func (u *UserNotificationSettingUpsertBulk) UpdateEnablePaymentStart() *UserNotificationSettingUpsertBulk
UpdateEnablePaymentStart sets the "enable_payment_start" field to the value that was provided on create.
func (u *UserNotificationSettingUpsertBulk) UpdateName() *UserNotificationSettingUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (u *UserNotificationSettingUpsertBulk) UpdateNewValues() *UserNotificationSettingUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.UserNotificationSetting.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *UserNotificationSettingUpsertBulk) UpdateOwnerUserID() *UserNotificationSettingUpsertBulk
UpdateOwnerUserID sets the "owner_user_id" field to the value that was provided on create.
func (u *UserNotificationSettingUpsertBulk) UpdateSlug() *UserNotificationSettingUpsertBulk
UpdateSlug sets the "slug" field to the value that was provided on create.
func (u *UserNotificationSettingUpsertBulk) UpdateToken() *UserNotificationSettingUpsertBulk
UpdateToken sets the "token" field to the value that was provided on create.
func (u *UserNotificationSettingUpsertBulk) UpdateUpdatedAt() *UserNotificationSettingUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
UserNotificationSettingUpsertOne is the builder for "upsert"-ing
one UserNotificationSetting node.
type UserNotificationSettingUpsertOne struct {
// contains filtered or unexported fields
}
func (u *UserNotificationSettingUpsertOne) ClearOwnerUserID() *UserNotificationSettingUpsertOne
ClearOwnerUserID clears the value of the "owner_user_id" field.
func (u *UserNotificationSettingUpsertOne) ClearUpdatedAt() *UserNotificationSettingUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *UserNotificationSettingUpsertOne) DoNothing() *UserNotificationSettingUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *UserNotificationSettingUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *UserNotificationSettingUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *UserNotificationSettingUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *UserNotificationSettingUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *UserNotificationSettingUpsertOne) Ignore() *UserNotificationSettingUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.UserNotificationSetting.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *UserNotificationSettingUpsertOne) SetEnableNewPosts(v bool) *UserNotificationSettingUpsertOne
SetEnableNewPosts sets the "enable_new_posts" field.
func (u *UserNotificationSettingUpsertOne) SetEnablePaymentDue(v bool) *UserNotificationSettingUpsertOne
SetEnablePaymentDue sets the "enable_payment_due" field.
func (u *UserNotificationSettingUpsertOne) SetEnablePaymentStart(v bool) *UserNotificationSettingUpsertOne
SetEnablePaymentStart sets the "enable_payment_start" field.
func (u *UserNotificationSettingUpsertOne) SetName(v string) *UserNotificationSettingUpsertOne
SetName sets the "name" field.
func (u *UserNotificationSettingUpsertOne) SetOwnerUserID(v int) *UserNotificationSettingUpsertOne
SetOwnerUserID sets the "owner_user_id" field.
func (u *UserNotificationSettingUpsertOne) SetSlug(v string) *UserNotificationSettingUpsertOne
SetSlug sets the "slug" field.
func (u *UserNotificationSettingUpsertOne) SetToken(v string) *UserNotificationSettingUpsertOne
SetToken sets the "token" field.
func (u *UserNotificationSettingUpsertOne) SetUpdatedAt(v time.Time) *UserNotificationSettingUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (u *UserNotificationSettingUpsertOne) Update(set func(*UserNotificationSettingUpsert)) *UserNotificationSettingUpsertOne
Update allows overriding fields `UPDATE` values. See the UserNotificationSettingCreate.OnConflict documentation for more info.
func (u *UserNotificationSettingUpsertOne) UpdateEnableNewPosts() *UserNotificationSettingUpsertOne
UpdateEnableNewPosts sets the "enable_new_posts" field to the value that was provided on create.
func (u *UserNotificationSettingUpsertOne) UpdateEnablePaymentDue() *UserNotificationSettingUpsertOne
UpdateEnablePaymentDue sets the "enable_payment_due" field to the value that was provided on create.
func (u *UserNotificationSettingUpsertOne) UpdateEnablePaymentStart() *UserNotificationSettingUpsertOne
UpdateEnablePaymentStart sets the "enable_payment_start" field to the value that was provided on create.
func (u *UserNotificationSettingUpsertOne) UpdateName() *UserNotificationSettingUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (u *UserNotificationSettingUpsertOne) UpdateNewValues() *UserNotificationSettingUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.UserNotificationSetting.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *UserNotificationSettingUpsertOne) UpdateOwnerUserID() *UserNotificationSettingUpsertOne
UpdateOwnerUserID sets the "owner_user_id" field to the value that was provided on create.
func (u *UserNotificationSettingUpsertOne) UpdateSlug() *UserNotificationSettingUpsertOne
UpdateSlug sets the "slug" field to the value that was provided on create.
func (u *UserNotificationSettingUpsertOne) UpdateToken() *UserNotificationSettingUpsertOne
UpdateToken sets the "token" field to the value that was provided on create.
func (u *UserNotificationSettingUpsertOne) UpdateUpdatedAt() *UserNotificationSettingUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
UserNotificationSettings is a parsable slice of UserNotificationSetting.
type UserNotificationSettings []*UserNotificationSetting
UserOrder defines the ordering of User.
type UserOrder struct {
Direction OrderDirection `json:"direction"`
Field *UserOrderField `json:"field"`
}
UserOrderField defines the ordering field of User.
type UserOrderField struct {
// contains filtered or unexported fields
}
UserPaginateOption enables pagination customization.
type UserPaginateOption func(*userPager) error
func WithUserFilter(filter func(*UserQuery) (*UserQuery, error)) UserPaginateOption
WithUserFilter configures pagination filter.
func WithUserOrder(order *UserOrder) UserPaginateOption
WithUserOrder configures pagination ordering.
UserQuery is the builder for querying User entities.
type UserQuery struct {
// contains filtered or unexported fields
}
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
All executes the query and returns a list of Users.
func (uq *UserQuery) AllX(ctx context.Context) []*User
AllX is like All, but panics if an error occurs.
func (uq *UserQuery) Clone() *UserQuery
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (u *UserQuery) CollectFields(ctx context.Context, satisfies ...string) (*UserQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (uq *UserQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (uq *UserQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (uq *UserQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (uq *UserQuery) Filter() *UserFilter
Filter returns a Filter implementation to apply filters on the UserQuery builder.
func (uq *UserQuery) First(ctx context.Context) (*User, error)
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (uq *UserQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (uq *UserQuery) FirstX(ctx context.Context) *User
FirstX is like First, but panics if an error occurs.
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.User.Query().
GroupBy(user.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (uq *UserQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of User IDs.
func (uq *UserQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (uq *UserQuery) Limit(limit int) *UserQuery
Limit the number of records to be returned by this query.
func (uq *UserQuery) Offset(offset int) *UserQuery
Offset to start from.
func (uq *UserQuery) Only(ctx context.Context) (*User, error)
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (uq *UserQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (uq *UserQuery) OnlyX(ctx context.Context) *User
OnlyX is like Only, but panics if an error occurs.
func (uq *UserQuery) Order(o ...user.Order) *UserQuery
Order specifies how the records should be ordered.
func (u *UserQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...UserPaginateOption, ) (*UserConnection, error)
Paginate executes the query and returns a relay based cursor connection to User.
func (uq *UserQuery) QueryAuth() *AuthQuery
QueryAuth chains the current query on the "auth" edge.
func (uq *UserQuery) QueryHpfcEventTickets() *HPFCEventTicketQuery
QueryHpfcEventTickets chains the current query on the "hpfc_event_tickets" edge.
func (uq *UserQuery) QueryHpmemberFollowing() *HPFollowQuery
QueryHpmemberFollowing chains the current query on the "hpmember_following" edge.
func (uq *UserQuery) QueryHpsortHistory() *HPSortHistoryQuery
QueryHpsortHistory chains the current query on the "hpsort_history" edge.
func (uq *UserQuery) QueryHpviewHistory() *HPViewHistoryQuery
QueryHpviewHistory chains the current query on the "hpview_history" edge.
func (uq *UserQuery) QueryNotificationSettings() *UserNotificationSettingQuery
QueryNotificationSettings chains the current query on the "notification_settings" edge.
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.User.Query().
Select(user.FieldCreatedAt).
Scan(ctx, &v)
func (uq *UserQuery) Unique(unique bool) *UserQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
Where adds a new predicate for the UserQuery builder.
func (uq *UserQuery) WithAuth(opts ...func(*AuthQuery)) *UserQuery
WithAuth tells the query-builder to eager-load the nodes that are connected to the "auth" edge. The optional arguments are used to configure the query builder of the edge.
func (uq *UserQuery) WithHpfcEventTickets(opts ...func(*HPFCEventTicketQuery)) *UserQuery
WithHpfcEventTickets tells the query-builder to eager-load the nodes that are connected to the "hpfc_event_tickets" edge. The optional arguments are used to configure the query builder of the edge.
func (uq *UserQuery) WithHpmemberFollowing(opts ...func(*HPFollowQuery)) *UserQuery
WithHpmemberFollowing tells the query-builder to eager-load the nodes that are connected to the "hpmember_following" edge. The optional arguments are used to configure the query builder of the edge.
func (uq *UserQuery) WithHpsortHistory(opts ...func(*HPSortHistoryQuery)) *UserQuery
WithHpsortHistory tells the query-builder to eager-load the nodes that are connected to the "hpsort_history" edge. The optional arguments are used to configure the query builder of the edge.
func (uq *UserQuery) WithHpviewHistory(opts ...func(*HPViewHistoryQuery)) *UserQuery
WithHpviewHistory tells the query-builder to eager-load the nodes that are connected to the "hpview_history" edge. The optional arguments are used to configure the query builder of the edge.
func (uq *UserQuery) WithNamedAuth(name string, opts ...func(*AuthQuery)) *UserQuery
WithNamedAuth tells the query-builder to eager-load the nodes that are connected to the "auth" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (uq *UserQuery) WithNamedHpfcEventTickets(name string, opts ...func(*HPFCEventTicketQuery)) *UserQuery
WithNamedHpfcEventTickets tells the query-builder to eager-load the nodes that are connected to the "hpfc_event_tickets" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (uq *UserQuery) WithNamedHpmemberFollowing(name string, opts ...func(*HPFollowQuery)) *UserQuery
WithNamedHpmemberFollowing tells the query-builder to eager-load the nodes that are connected to the "hpmember_following" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (uq *UserQuery) WithNamedHpsortHistory(name string, opts ...func(*HPSortHistoryQuery)) *UserQuery
WithNamedHpsortHistory tells the query-builder to eager-load the nodes that are connected to the "hpsort_history" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (uq *UserQuery) WithNamedHpviewHistory(name string, opts ...func(*HPViewHistoryQuery)) *UserQuery
WithNamedHpviewHistory tells the query-builder to eager-load the nodes that are connected to the "hpview_history" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (uq *UserQuery) WithNamedNotificationSettings(name string, opts ...func(*UserNotificationSettingQuery)) *UserQuery
WithNamedNotificationSettings tells the query-builder to eager-load the nodes that are connected to the "notification_settings" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (uq *UserQuery) WithNotificationSettings(opts ...func(*UserNotificationSettingQuery)) *UserQuery
WithNotificationSettings tells the query-builder to eager-load the nodes that are connected to the "notification_settings" edge. The optional arguments are used to configure the query builder of the edge.
UserSelect is the builder for selecting fields of User entities.
type UserSelect struct {
*UserQuery
// contains filtered or unexported fields
}
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (s *UserSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (s *UserSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (s *UserSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (s *UserSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (s *UserSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (s *UserSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (s *UserSelect) ScanX(ctx context.Context, v any)
ScanX is like Scan, but panics if an error occurs.
func (s *UserSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (s *UserSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
Strings returns list of strings from a selector. It is only allowed when selecting one field.
func (s *UserSelect) StringsX(ctx context.Context) []string
StringsX is like Strings, but panics if an error occurs.
UserUpdate is the builder for updating User entities.
type UserUpdate struct {
// contains filtered or unexported fields
}
func (uu *UserUpdate) AddAuth(a ...*Auth) *UserUpdate
AddAuth adds the "auth" edges to the Auth entity.
func (uu *UserUpdate) AddAuthIDs(ids ...int) *UserUpdate
AddAuthIDs adds the "auth" edge to the Auth entity by IDs.
func (uu *UserUpdate) AddHpfcEventTicketIDs(ids ...int) *UserUpdate
AddHpfcEventTicketIDs adds the "hpfc_event_tickets" edge to the HPFCEventTicket entity by IDs.
func (uu *UserUpdate) AddHpfcEventTickets(h ...*HPFCEventTicket) *UserUpdate
AddHpfcEventTickets adds the "hpfc_event_tickets" edges to the HPFCEventTicket entity.
func (uu *UserUpdate) AddHpmemberFollowing(h ...*HPFollow) *UserUpdate
AddHpmemberFollowing adds the "hpmember_following" edges to the HPFollow entity.
func (uu *UserUpdate) AddHpmemberFollowingIDs(ids ...int) *UserUpdate
AddHpmemberFollowingIDs adds the "hpmember_following" edge to the HPFollow entity by IDs.
func (uu *UserUpdate) AddHpsortHistory(h ...*HPSortHistory) *UserUpdate
AddHpsortHistory adds the "hpsort_history" edges to the HPSortHistory entity.
func (uu *UserUpdate) AddHpsortHistoryIDs(ids ...int) *UserUpdate
AddHpsortHistoryIDs adds the "hpsort_history" edge to the HPSortHistory entity by IDs.
func (uu *UserUpdate) AddHpviewHistory(h ...*HPViewHistory) *UserUpdate
AddHpviewHistory adds the "hpview_history" edges to the HPViewHistory entity.
func (uu *UserUpdate) AddHpviewHistoryIDs(ids ...int) *UserUpdate
AddHpviewHistoryIDs adds the "hpview_history" edge to the HPViewHistory entity by IDs.
func (uu *UserUpdate) AddNotificationSettingIDs(ids ...int) *UserUpdate
AddNotificationSettingIDs adds the "notification_settings" edge to the UserNotificationSetting entity by IDs.
func (uu *UserUpdate) AddNotificationSettings(u ...*UserNotificationSetting) *UserUpdate
AddNotificationSettings adds the "notification_settings" edges to the UserNotificationSetting entity.
func (uu *UserUpdate) ClearAuth() *UserUpdate
ClearAuth clears all "auth" edges to the Auth entity.
func (uu *UserUpdate) ClearHpfcEventTickets() *UserUpdate
ClearHpfcEventTickets clears all "hpfc_event_tickets" edges to the HPFCEventTicket entity.
func (uu *UserUpdate) ClearHpmemberFollowing() *UserUpdate
ClearHpmemberFollowing clears all "hpmember_following" edges to the HPFollow entity.
func (uu *UserUpdate) ClearHpsortHistory() *UserUpdate
ClearHpsortHistory clears all "hpsort_history" edges to the HPSortHistory entity.
func (uu *UserUpdate) ClearHpviewHistory() *UserUpdate
ClearHpviewHistory clears all "hpview_history" edges to the HPViewHistory entity.
func (uu *UserUpdate) ClearNotificationSettings() *UserUpdate
ClearNotificationSettings clears all "notification_settings" edges to the UserNotificationSetting entity.
func (uu *UserUpdate) ClearUpdatedAt() *UserUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (uu *UserUpdate) RemoveAuth(a ...*Auth) *UserUpdate
RemoveAuth removes "auth" edges to Auth entities.
func (uu *UserUpdate) RemoveAuthIDs(ids ...int) *UserUpdate
RemoveAuthIDs removes the "auth" edge to Auth entities by IDs.
func (uu *UserUpdate) RemoveHpfcEventTicketIDs(ids ...int) *UserUpdate
RemoveHpfcEventTicketIDs removes the "hpfc_event_tickets" edge to HPFCEventTicket entities by IDs.
func (uu *UserUpdate) RemoveHpfcEventTickets(h ...*HPFCEventTicket) *UserUpdate
RemoveHpfcEventTickets removes "hpfc_event_tickets" edges to HPFCEventTicket entities.
func (uu *UserUpdate) RemoveHpmemberFollowing(h ...*HPFollow) *UserUpdate
RemoveHpmemberFollowing removes "hpmember_following" edges to HPFollow entities.
func (uu *UserUpdate) RemoveHpmemberFollowingIDs(ids ...int) *UserUpdate
RemoveHpmemberFollowingIDs removes the "hpmember_following" edge to HPFollow entities by IDs.
func (uu *UserUpdate) RemoveHpsortHistory(h ...*HPSortHistory) *UserUpdate
RemoveHpsortHistory removes "hpsort_history" edges to HPSortHistory entities.
func (uu *UserUpdate) RemoveHpsortHistoryIDs(ids ...int) *UserUpdate
RemoveHpsortHistoryIDs removes the "hpsort_history" edge to HPSortHistory entities by IDs.
func (uu *UserUpdate) RemoveHpviewHistory(h ...*HPViewHistory) *UserUpdate
RemoveHpviewHistory removes "hpview_history" edges to HPViewHistory entities.
func (uu *UserUpdate) RemoveHpviewHistoryIDs(ids ...int) *UserUpdate
RemoveHpviewHistoryIDs removes the "hpview_history" edge to HPViewHistory entities by IDs.
func (uu *UserUpdate) RemoveNotificationSettingIDs(ids ...int) *UserUpdate
RemoveNotificationSettingIDs removes the "notification_settings" edge to UserNotificationSetting entities by IDs.
func (uu *UserUpdate) RemoveNotificationSettings(u ...*UserNotificationSetting) *UserUpdate
RemoveNotificationSettings removes "notification_settings" edges to UserNotificationSetting entities.
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (uu *UserUpdate) SetAccessToken(s string) *UserUpdate
SetAccessToken sets the "access_token" field.
func (uu *UserUpdate) SetNillableUpdatedAt(t *time.Time) *UserUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (uu *UserUpdate) SetUsername(s string) *UserUpdate
SetUsername sets the "username" field.
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
UserUpdateOne is the builder for updating a single User entity.
type UserUpdateOne struct {
// contains filtered or unexported fields
}
func (uuo *UserUpdateOne) AddAuth(a ...*Auth) *UserUpdateOne
AddAuth adds the "auth" edges to the Auth entity.
func (uuo *UserUpdateOne) AddAuthIDs(ids ...int) *UserUpdateOne
AddAuthIDs adds the "auth" edge to the Auth entity by IDs.
func (uuo *UserUpdateOne) AddHpfcEventTicketIDs(ids ...int) *UserUpdateOne
AddHpfcEventTicketIDs adds the "hpfc_event_tickets" edge to the HPFCEventTicket entity by IDs.
func (uuo *UserUpdateOne) AddHpfcEventTickets(h ...*HPFCEventTicket) *UserUpdateOne
AddHpfcEventTickets adds the "hpfc_event_tickets" edges to the HPFCEventTicket entity.
func (uuo *UserUpdateOne) AddHpmemberFollowing(h ...*HPFollow) *UserUpdateOne
AddHpmemberFollowing adds the "hpmember_following" edges to the HPFollow entity.
func (uuo *UserUpdateOne) AddHpmemberFollowingIDs(ids ...int) *UserUpdateOne
AddHpmemberFollowingIDs adds the "hpmember_following" edge to the HPFollow entity by IDs.
func (uuo *UserUpdateOne) AddHpsortHistory(h ...*HPSortHistory) *UserUpdateOne
AddHpsortHistory adds the "hpsort_history" edges to the HPSortHistory entity.
func (uuo *UserUpdateOne) AddHpsortHistoryIDs(ids ...int) *UserUpdateOne
AddHpsortHistoryIDs adds the "hpsort_history" edge to the HPSortHistory entity by IDs.
func (uuo *UserUpdateOne) AddHpviewHistory(h ...*HPViewHistory) *UserUpdateOne
AddHpviewHistory adds the "hpview_history" edges to the HPViewHistory entity.
func (uuo *UserUpdateOne) AddHpviewHistoryIDs(ids ...int) *UserUpdateOne
AddHpviewHistoryIDs adds the "hpview_history" edge to the HPViewHistory entity by IDs.
func (uuo *UserUpdateOne) AddNotificationSettingIDs(ids ...int) *UserUpdateOne
AddNotificationSettingIDs adds the "notification_settings" edge to the UserNotificationSetting entity by IDs.
func (uuo *UserUpdateOne) AddNotificationSettings(u ...*UserNotificationSetting) *UserUpdateOne
AddNotificationSettings adds the "notification_settings" edges to the UserNotificationSetting entity.
func (uuo *UserUpdateOne) ClearAuth() *UserUpdateOne
ClearAuth clears all "auth" edges to the Auth entity.
func (uuo *UserUpdateOne) ClearHpfcEventTickets() *UserUpdateOne
ClearHpfcEventTickets clears all "hpfc_event_tickets" edges to the HPFCEventTicket entity.
func (uuo *UserUpdateOne) ClearHpmemberFollowing() *UserUpdateOne
ClearHpmemberFollowing clears all "hpmember_following" edges to the HPFollow entity.
func (uuo *UserUpdateOne) ClearHpsortHistory() *UserUpdateOne
ClearHpsortHistory clears all "hpsort_history" edges to the HPSortHistory entity.
func (uuo *UserUpdateOne) ClearHpviewHistory() *UserUpdateOne
ClearHpviewHistory clears all "hpview_history" edges to the HPViewHistory entity.
func (uuo *UserUpdateOne) ClearNotificationSettings() *UserUpdateOne
ClearNotificationSettings clears all "notification_settings" edges to the UserNotificationSetting entity.
func (uuo *UserUpdateOne) ClearUpdatedAt() *UserUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (uuo *UserUpdateOne) RemoveAuth(a ...*Auth) *UserUpdateOne
RemoveAuth removes "auth" edges to Auth entities.
func (uuo *UserUpdateOne) RemoveAuthIDs(ids ...int) *UserUpdateOne
RemoveAuthIDs removes the "auth" edge to Auth entities by IDs.
func (uuo *UserUpdateOne) RemoveHpfcEventTicketIDs(ids ...int) *UserUpdateOne
RemoveHpfcEventTicketIDs removes the "hpfc_event_tickets" edge to HPFCEventTicket entities by IDs.
func (uuo *UserUpdateOne) RemoveHpfcEventTickets(h ...*HPFCEventTicket) *UserUpdateOne
RemoveHpfcEventTickets removes "hpfc_event_tickets" edges to HPFCEventTicket entities.
func (uuo *UserUpdateOne) RemoveHpmemberFollowing(h ...*HPFollow) *UserUpdateOne
RemoveHpmemberFollowing removes "hpmember_following" edges to HPFollow entities.
func (uuo *UserUpdateOne) RemoveHpmemberFollowingIDs(ids ...int) *UserUpdateOne
RemoveHpmemberFollowingIDs removes the "hpmember_following" edge to HPFollow entities by IDs.
func (uuo *UserUpdateOne) RemoveHpsortHistory(h ...*HPSortHistory) *UserUpdateOne
RemoveHpsortHistory removes "hpsort_history" edges to HPSortHistory entities.
func (uuo *UserUpdateOne) RemoveHpsortHistoryIDs(ids ...int) *UserUpdateOne
RemoveHpsortHistoryIDs removes the "hpsort_history" edge to HPSortHistory entities by IDs.
func (uuo *UserUpdateOne) RemoveHpviewHistory(h ...*HPViewHistory) *UserUpdateOne
RemoveHpviewHistory removes "hpview_history" edges to HPViewHistory entities.
func (uuo *UserUpdateOne) RemoveHpviewHistoryIDs(ids ...int) *UserUpdateOne
RemoveHpviewHistoryIDs removes the "hpview_history" edge to HPViewHistory entities by IDs.
func (uuo *UserUpdateOne) RemoveNotificationSettingIDs(ids ...int) *UserUpdateOne
RemoveNotificationSettingIDs removes the "notification_settings" edge to UserNotificationSetting entities by IDs.
func (uuo *UserUpdateOne) RemoveNotificationSettings(u ...*UserNotificationSetting) *UserUpdateOne
RemoveNotificationSettings removes "notification_settings" edges to UserNotificationSetting entities.
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (uuo *UserUpdateOne) SetAccessToken(s string) *UserUpdateOne
SetAccessToken sets the "access_token" field.
func (uuo *UserUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
SetUsername sets the "username" field.
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
UserUpsert is the "OnConflict" setter.
type UserUpsert struct {
*sql.UpdateSet
}
func (u *UserUpsert) ClearUpdatedAt() *UserUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *UserUpsert) SetAccessToken(v string) *UserUpsert
SetAccessToken sets the "access_token" field.
func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert
SetUpdatedAt sets the "updated_at" field.
func (u *UserUpsert) SetUsername(v string) *UserUpsert
SetUsername sets the "username" field.
func (u *UserUpsert) UpdateAccessToken() *UserUpsert
UpdateAccessToken sets the "access_token" field to the value that was provided on create.
func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (u *UserUpsert) UpdateUsername() *UserUpsert
UpdateUsername sets the "username" field to the value that was provided on create.
UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.
type UserUpsertBulk struct {
// contains filtered or unexported fields
}
func (u *UserUpsertBulk) ClearUpdatedAt() *UserUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *UserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (u *UserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (u *UserUpsertBulk) SetAccessToken(v string) *UserUpsertBulk
SetAccessToken sets the "access_token" field.
func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (u *UserUpsertBulk) SetUsername(v string) *UserUpsertBulk
SetUsername sets the "username" field.
func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.
func (u *UserUpsertBulk) UpdateAccessToken() *UserUpsertBulk
UpdateAccessToken sets the "access_token" field to the value that was provided on create.
func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (u *UserUpsertBulk) UpdateUsername() *UserUpsertBulk
UpdateUsername sets the "username" field to the value that was provided on create.
UserUpsertOne is the builder for "upsert"-ing
one User node.
type UserUpsertOne struct {
// contains filtered or unexported fields
}
func (u *UserUpsertOne) ClearUpdatedAt() *UserUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (u *UserUpsertOne) DoNothing() *UserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (u *UserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (u *UserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (u *UserUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (u *UserUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (u *UserUpsertOne) Ignore() *UserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (u *UserUpsertOne) SetAccessToken(v string) *UserUpsertOne
SetAccessToken sets the "access_token" field.
func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (u *UserUpsertOne) SetUsername(v string) *UserUpsertOne
SetUsername sets the "username" field.
func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.
func (u *UserUpsertOne) UpdateAccessToken() *UserUpsertOne
UpdateAccessToken sets the "access_token" field to the value that was provided on create.
func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (u *UserUpsertOne) UpdateUpdatedAt() *UserUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (u *UserUpsertOne) UpdateUsername() *UserUpsertOne
UpdateUsername sets the "username" field to the value that was provided on create.
Users is a parsable slice of User.
type Users []*User
ValidationError returns when validating a field or edge fails.
type ValidationError struct {
Name string // Field or edge name.
// contains filtered or unexported fields
}
func (e *ValidationError) Error() string
Error implements the error interface.
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
ent aliases to avoid import conflicts in user's code.
type Value = ent.Value